test_class.declarator: logger = LoggerFactory.getLogger(TestGenericConverter.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger logger = LoggerFactory.getLogger(TestGenericConverter.class);
test_class.type: Logger
test_class.var_name: logger
test_class.declarator: charsetISO_8859 = Charset.forName("ISO-8859-1")
test_class.modifier: private static final
test_class.original_string: private static final Charset charsetISO_8859 = Charset.forName("ISO-8859-1");
test_class.type: Charset
test_class.var_name: charsetISO_8859
test_class.declarator: charsetDecoder = charsetISO_8859.newDecoder()
test_class.modifier: @SuppressWarnings("unused")
  	private static final
test_class.original_string: @SuppressWarnings("unused")
  	private static final CharsetDecoder charsetDecoder = charsetISO_8859.newDecoder();
test_class.type: CharsetDecoder
test_class.var_name: charsetDecoder
test_class.declarator: charsetEncoder = charsetISO_8859.newEncoder()
test_class.modifier: private static final
test_class.original_string: private static final CharsetEncoder charsetEncoder = charsetISO_8859.newEncoder();
test_class.type: CharsetEncoder
test_class.var_name: charsetEncoder
test_class.file: BackEnd/Core/sailfish-core/src/test/java/com/exactpro/sf/common/util/TestGenericConverter.java
test_class.identifier: TestGenericConverter
test_class.superclass: extends  EPSTestCase
test_case.body: @Test
  	public void testConvertSignedIntegerToArray() throws Exception
  	{
  		int value = -1234567;
  		int length = 10;
  
  		try
  		{
  			byte[] encoded = GenericConverter.convertSignedNumericToArray(length, value);
  			DumpAsString(encoded);
  			String model = "-001234567";
  
  			logger.info("testConvertSignedIntegerToArray model = {}", model );
  
  			ByteBuffer byteBuffer = charsetEncoder.encode(  CharBuffer.wrap(model.toCharArray()) ) ;
  			int index = 0 ;
  
  			// compare lengths
  			Assert.assertTrue( byteBuffer.array().length == encoded.length );
  
  			// compare each byte
  			for(byte byteModel : byteBuffer.array())
  			{
  				String msg = String.format( "Character at index [%d]. ", index );
  				Assert.assertTrue(msg, byteModel == encoded[index]);
  				++index;
  			}
  
  			value = 1234567;
  			encoded = GenericConverter.convertSignedNumericToArray(length, value);
  			DumpAsString(encoded);
  			model = "+001234567";
  
  			logger.info("testConvertSignedIntegerToArray model = {}", model );
  
  			byteBuffer = charsetEncoder.encode(  CharBuffer.wrap(model.toCharArray()) ) ;
  			index = 0 ;
  
  			// compare lengths
  			Assert.assertTrue( byteBuffer.array().length == encoded.length );
  
  			// compare each byte
  			for(byte byteModel : byteBuffer.array())
  			{
  				String msg = String.format( "Character at index [%d]. ", index );
  				Assert.assertTrue(msg, byteModel == encoded[index]);
  				++index;
  			}
  			logger.info("GenericConverter.FromSignedIntegerToArray() - test passed.");
  		}
  		catch(AssertionFailedError aseEx)
  		{
  			logger.error("GenericConverter.FromSignedIntegerToArray() - test FAILED.");
  			logger.error(aseEx.getMessage(), aseEx);
  			throw aseEx;
  		}
  		catch ( Exception ex )
  		{
  			logger.error(ex.getMessage(), ex);
  			ex.printStackTrace();
  			throw ex;
  		}
  	}
test_case.class_method_signature: TestGenericConverter.testConvertSignedIntegerToArray()
test_case.full_signature: @Test public void testConvertSignedIntegerToArray()
test_case.identifier: testConvertSignedIntegerToArray
test_case.invocations: convertSignedNumericToArray DumpAsString info encode wrap toCharArray assertTrue array array format assertTrue convertSignedNumericToArray DumpAsString info encode wrap toCharArray assertTrue array array format assertTrue info error error getMessage error getMessage printStackTrace
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testConvertSignedIntegerToArray()
focal_class.declarator: charsetISO_8859 = Charset.forName("ISO-8859-1")
focal_class.modifier: private static final
focal_class.original_string: private static final Charset charsetISO_8859 = Charset.forName("ISO-8859-1");
focal_class.type: Charset
focal_class.var_name: charsetISO_8859
focal_class.file: BackEnd/Core/sailfish-core/src/main/java/com/exactpro/sf/common/util/GenericConverter.java
focal_class.identifier: GenericConverter
focal_class.class_method_signature: GenericConverter.convertStringToArray(int length, String value)
focal_class.full_signature: public static byte[] convertStringToArray(int length, String value)
focal_class.identifier: convertStringToArray
focal_class.modifiers: public static
focal_class.parameters: (int length, String value)
focal_class.return: byte[]
focal_class.signature: byte[] convertStringToArray(int length, String value)
focal_class.class_method_signature: GenericConverter.convertSignedNumericToArray(int length, T value )
focal_class.full_signature: public static byte[] convertSignedNumericToArray(int length, T value )
focal_class.identifier: convertSignedNumericToArray
focal_class.modifiers: public static
focal_class.parameters: (int length, T value )
focal_class.return: byte[]
focal_class.signature: byte[] convertSignedNumericToArray(int length, T value )
focal_class.class_method_signature: GenericConverter.convertSignedNumericToArray(int length, T value, int precision )
focal_class.full_signature: public static byte[] convertSignedNumericToArray(int length, T value, int precision )
focal_class.identifier: convertSignedNumericToArray
focal_class.modifiers: public static
focal_class.parameters: (int length, T value, int precision )
focal_class.return: byte[]
focal_class.signature: byte[] convertSignedNumericToArray(int length, T value, int precision )
focal_class.class_method_signature: GenericConverter.convertUnsignedNumericToArray(int length, T value )
focal_class.full_signature: public static byte[] convertUnsignedNumericToArray(int length, T value )
focal_class.identifier: convertUnsignedNumericToArray
focal_class.modifiers: public static
focal_class.parameters: (int length, T value )
focal_class.return: byte[]
focal_class.signature: byte[] convertUnsignedNumericToArray(int length, T value )
focal_class.class_method_signature: GenericConverter.convertUnsignedNumericToArray(int length, T value, int precision )
focal_class.full_signature: public static byte[] convertUnsignedNumericToArray(int length, T value, int precision )
focal_class.identifier: convertUnsignedNumericToArray
focal_class.modifiers: public static
focal_class.parameters: (int length, T value, int precision )
focal_class.return: byte[]
focal_class.signature: byte[] convertUnsignedNumericToArray(int length, T value, int precision )
focal_class.class_method_signature: GenericConverter.convertByteArrayToString( int length, byte[] byteArray )
focal_class.full_signature: public static String convertByteArrayToString( int length, byte[] byteArray )
focal_class.identifier: convertByteArrayToString
focal_class.modifiers: public static
focal_class.parameters: ( int length, byte[] byteArray )
focal_class.return: String
focal_class.signature: String convertByteArrayToString( int length, byte[] byteArray )
focal_class.class_method_signature: GenericConverter.convertByteArrayToAnyInteger( int length, byte[] byteArray )
focal_class.full_signature: public static Integer convertByteArrayToAnyInteger( int length, byte[] byteArray )
focal_class.identifier: convertByteArrayToAnyInteger
focal_class.modifiers: public static
focal_class.parameters: ( int length, byte[] byteArray )
focal_class.return: Integer
focal_class.signature: Integer convertByteArrayToAnyInteger( int length, byte[] byteArray )
focal_class.class_method_signature: GenericConverter.convertByteArrayToAnyLong( int length, byte[] byteArray )
focal_class.full_signature: public static Long convertByteArrayToAnyLong( int length, byte[] byteArray )
focal_class.identifier: convertByteArrayToAnyLong
focal_class.modifiers: public static
focal_class.parameters: ( int length, byte[] byteArray )
focal_class.return: Long
focal_class.signature: Long convertByteArrayToAnyLong( int length, byte[] byteArray )
focal_class.class_method_signature: GenericConverter.convertByteArrayToAnyDouble( int length, byte[] byteArray, int precision )
focal_class.full_signature: public static Double convertByteArrayToAnyDouble( int length, byte[] byteArray, int precision )
focal_class.identifier: convertByteArrayToAnyDouble
focal_class.modifiers: public static
focal_class.parameters: ( int length, byte[] byteArray, int precision )
focal_class.return: Double
focal_class.signature: Double convertByteArrayToAnyDouble( int length, byte[] byteArray, int precision )
focal_class.class_method_signature: GenericConverter.convertByteArrayToAnyDecimal( int length, byte[] byteArray, int precision )
focal_class.full_signature: public static BigDecimal convertByteArrayToAnyDecimal( int length, byte[] byteArray, int precision )
focal_class.identifier: convertByteArrayToAnyDecimal
focal_class.modifiers: public static
focal_class.parameters: ( int length, byte[] byteArray, int precision )
focal_class.return: BigDecimal
focal_class.signature: BigDecimal convertByteArrayToAnyDecimal( int length, byte[] byteArray, int precision )
focal_method.body: public static <T extends Number> byte[] convertSignedNumericToArray(int length, T value )
  	{
  		return convertSignedNumericToArray( length, value, 0 );
  	}
focal_method.class_method_signature: GenericConverter.convertSignedNumericToArray(int length, T value )
focal_method.full_signature: public static byte[] convertSignedNumericToArray(int length, T value )
focal_method.identifier: convertSignedNumericToArray
focal_method.invocations: convertSignedNumericToArray
focal_method.modifiers: public static
focal_method.parameters: (int length, T value )
focal_method.return: byte[]
focal_method.signature: byte[] convertSignedNumericToArray(int length, T value )