Fixed test
This commit is contained in:
parent
85c773fb1b
commit
a1fbd07378
|
@ -120,12 +120,13 @@ public class QueryTest extends ERManagementTest {
|
||||||
|
|
||||||
json = isRelatedToManagement.all(true);
|
json = isRelatedToManagement.all(true);
|
||||||
|
|
||||||
List<Resource> resourcesList = ElementMapper.unmarshalList(Resource.class, json);
|
@SuppressWarnings("rawtypes")
|
||||||
|
List<IsRelatedTo> resourcesList = ElementMapper.unmarshalList(IsRelatedTo.class, json);
|
||||||
logger.debug("{} are {} : {} ", IsRelatedTo.NAME, resourcesList.size(), resourcesList);
|
logger.debug("{} are {} : {} ", IsRelatedTo.NAME, resourcesList.size(), resourcesList);
|
||||||
Assert.assertTrue(resourcesList.size() == MAX);
|
Assert.assertTrue(resourcesList.size() == MAX);
|
||||||
|
|
||||||
json = isRelatedToManagement.all(false);
|
json = isRelatedToManagement.all(false);
|
||||||
resourcesList = ElementMapper.unmarshalList(Resource.class, json);
|
resourcesList = ElementMapper.unmarshalList(IsRelatedTo.class, json);
|
||||||
Assert.assertTrue(resourcesList.size() == 0);
|
Assert.assertTrue(resourcesList.size() == 0);
|
||||||
|
|
||||||
/* Getting all ConsistsOf polymorphic and non polymorphic */
|
/* Getting all ConsistsOf polymorphic and non polymorphic */
|
||||||
|
@ -134,12 +135,14 @@ public class QueryTest extends ERManagementTest {
|
||||||
.getERManagement(ConsistsOf.NAME);
|
.getERManagement(ConsistsOf.NAME);
|
||||||
|
|
||||||
json = consistsOfManagement.all(true);
|
json = consistsOfManagement.all(true);
|
||||||
List<Resource> consistsOfPolimorphicList = ElementMapper.unmarshalList(Resource.class, json);
|
@SuppressWarnings("rawtypes")
|
||||||
logger.debug("{} are {} : {} ", IsRelatedTo.NAME, consistsOfPolimorphicList.size(), consistsOfPolimorphicList);
|
List<ConsistsOf> consistsOfPolimorphicList = ElementMapper.unmarshalList(ConsistsOf.class, json);
|
||||||
|
logger.debug("{} are {} : {} ", ConsistsOf.NAME, consistsOfPolimorphicList.size(), consistsOfPolimorphicList);
|
||||||
|
|
||||||
json = consistsOfManagement.all(false);
|
json = consistsOfManagement.all(false);
|
||||||
List<Resource> consistsOfNonPolimorphicList = ElementMapper.unmarshalList(Resource.class, json);
|
@SuppressWarnings("rawtypes")
|
||||||
logger.debug("{} are {} : {} ", IsRelatedTo.NAME, consistsOfNonPolimorphicList.size(),
|
List<ConsistsOf> consistsOfNonPolimorphicList = ElementMapper.unmarshalList(ConsistsOf.class, json);
|
||||||
|
logger.debug("{} are {} : {} ", ConsistsOf.NAME, consistsOfNonPolimorphicList.size(),
|
||||||
consistsOfNonPolimorphicList);
|
consistsOfNonPolimorphicList);
|
||||||
|
|
||||||
Assert.assertTrue(consistsOfPolimorphicList.size() >= consistsOfNonPolimorphicList.size());
|
Assert.assertTrue(consistsOfPolimorphicList.size() >= consistsOfNonPolimorphicList.size());
|
||||||
|
|
Loading…
Reference in New Issue