List of usage examples for java.lang Byte getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:org.qi4j.runtime.value.CollectionTypeTest.java
@Test public void givenJsonOfByteListWhenDeserializingExpectCorrectValueOutput() throws Exception { TypeName numberTypeName = TypeName.nameOf(Byte.class); ValueType collectedType = new NumberType(numberTypeName); TypeName typeName = TypeName.nameOf(List.class); CollectionType collectionType = new CollectionType(typeName, collectedType); Object json = new JSONArray(byteJson()); ArrayList<Byte> result = (ArrayList<Byte>) collectionType.fromJSON(json, null); ArrayList<Byte> bytes = byteCollection(); for (int i = 0; i < result.size(); i++) { Byte resultByte = result.get(i); if (resultByte != null) { assertEquals(Byte.class, resultByte.getClass()); }/*ww w.java 2 s . c o m*/ assertEquals(bytes.get(i), resultByte); } }
From source file:br.gov.frameworkdemoiselle.internal.configuration.ConfigurationLoaderWithArrayTest.java
@Test public void testConfigurationPropertiesWithByteArray() { ConfigurationPropertiesWithArray config = prepareConfigurationPropertiesWithArray(); Byte byteValue = config.byteArray[0]; assertEquals(Byte.class, byteValue.getClass()); assertEquals(Byte.MAX_VALUE, byteValue.byteValue()); assertEquals(8, config.byteArray.length); }
From source file:br.gov.frameworkdemoiselle.internal.configuration.ConfigurationLoaderWithArrayTest.java
@Test public void testConfigurationXMLWithByteArray() { ConfigurationXMLWithArray config = prepareConfigurationXMLWithArray(); Byte byteValue = config.byteArray[0]; assertEquals(Byte.class, byteValue.getClass()); assertEquals(Byte.MAX_VALUE, byteValue.byteValue()); assertEquals(8, config.byteArray.length); }
From source file:br.gov.frameworkdemoiselle.internal.configuration.ConfigurationLoaderWithListTest.java
@Test public void testConfigurationPropertiesWithByteList() { ConfigurationPropertiesWithList config = prepareConfigurationPropertiesWithList(); Byte byteValue = config.byteList.get(0); assertEquals(Byte.class, byteValue.getClass()); assertEquals(Byte.MAX_VALUE, byteValue.byteValue()); assertEquals(8, config.byteList.size()); }
From source file:br.gov.frameworkdemoiselle.internal.configuration.ConfigurationLoaderWithListTest.java
@Test public void testConfigurationXMLWithByteList() { ConfigurationXMLWithList config = prepareConfigurationXMLWithList(); Byte byteValue = config.byteList.get(0); assertEquals(Byte.class, byteValue.getClass()); assertEquals(Byte.MAX_VALUE, byteValue.byteValue()); assertEquals(8, config.byteList.size()); }