Skip to content

Commit 2dfbbdb

Browse files
committed
Correction of invalid type passing logic for testing purpose
1 parent 8dcae31 commit 2dfbbdb

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/test/java/microsoft/exchange/webservices/data/property/complex/ExtendedPropertyCollectionTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@ public class ExtendedPropertyCollectionTest {
4646
public void tryGetValue() throws Exception{
4747
ExtendedPropertyCollection epc = new ExtendedPropertyCollection();
4848
epc.setExtendedProperty(new ExtendedPropertyDefinition(), new ArrayList<Boolean>());
49-
Class<String> cls = String.class;
49+
Class<Long> cls = Long.class;
50+
// By default - type of ExtendedPropertyDefinition will be String
5051
ExtendedPropertyDefinition propertyDefinition = new ExtendedPropertyDefinition();
5152

52-
OutParam<String> propertyValueOut = new OutParam<String>();
53+
OutParam<Long> propertyValueOut = new OutParam<Long>();
54+
// It should fail here due to incompatibility between default String and passed Long
5355
Assert.assertTrue(epc.tryGetValue(cls, propertyDefinition, propertyValueOut));
5456
}
5557
}

0 commit comments

Comments
 (0)