[OLINGO-260] fix type seraialization + opentype integration test extension

This commit is contained in:
fmartelli 2014-05-15 10:35:24 +02:00 committed by Stephan Klevenz
parent e1e637f9e2
commit c8ede38f65
2 changed files with 6 additions and 6 deletions

View File

@ -119,9 +119,9 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
assertEquals(String.class, rowIndex.getAdditionalProperty("aString").getClass());
assertEquals(Boolean.class, rowIndex.getAdditionalProperty("aBoolean").getClass());
assertEquals(Double.class, rowIndex.getAdditionalProperty("aDouble").getClass());
// assertEquals(Short.class, rowIndex.getAdditionalProperty("aByte").getClass()); // trova integer
// assertEquals(Byte.MAX_VALUE, rowIndex.getAdditionalProperty("aByte"));
// assertEquals(Calendar.class, rowIndex.getAdditionalProperty("aDate").getClass()); // trova stringa
assertEquals(Byte.class, rowIndex.getAdditionalProperty("aByte").getClass());
assertEquals(Byte.MAX_VALUE, rowIndex.getAdditionalProperty("aByte"));
assertTrue(Calendar.class.isAssignableFrom(rowIndex.getAdditionalProperty("aDate").getClass()));
// assertEquals(ContactDetails.class, rowIndex.getAdditionalProperty("aContact").getClass().getInterfaces()[0]);
entityContext.detachAll();

View File

@ -81,7 +81,7 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
final Integer id = 1426;
ODataEntity rowIndex = getClient().getObjectFactory().newEntity(
new FullQualifiedName("Microsoft.Test.OData.Services.OpenTypesServiceV3.RowIndex"));
new FullQualifiedName("Microsoft.Test.OData.Services.OpenTypesService.RowIndex"));
getClient().getBinder().add(rowIndex,
getClient().getObjectFactory().newPrimitiveProperty("Id",
getClient().getObjectFactory().newPrimitiveValueBuilder().buildInt32(id)));
@ -106,7 +106,7 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
build()));
final ODataComplexValue<ODataProperty> contactDetails = getClient().getObjectFactory().newComplexValue(
"Microsoft.Test.OData.Services.OpenTypesServiceV3.ContactDetails");
"Microsoft.Test.OData.Services.OpenTypesService.ContactDetails");
contactDetails.add(getClient().getObjectFactory().newPrimitiveProperty("FirstContacted",
getClient().getObjectFactory().newPrimitiveValueBuilder().buildBinary("text".getBytes())));
contactDetails.add(getClient().getObjectFactory().newPrimitiveProperty("LastContacted",
@ -161,7 +161,7 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
assertTrue(rowIndex.getProperty("aDate").hasPrimitiveValue());
assertEquals(EdmPrimitiveTypeKind.DateTime, rowIndex.getProperty("aDate").getPrimitiveValue().getTypeKind());
assertTrue(rowIndex.getProperty("aContact").hasComplexValue());
assertEquals("Microsoft.Test.OData.Services.OpenTypesServiceV3.ContactDetails",
assertEquals("Microsoft.Test.OData.Services.OpenTypesService.ContactDetails",
rowIndex.getProperty("aContact").getValue().getTypeName());
assertTrue(rowIndex.getProperty("aContact").getComplexValue().get("SignedByte").hasPrimitiveValue());