improving tests
This commit is contained in:
parent
f760231d6b
commit
c1f0a03de4
|
@ -242,11 +242,11 @@ public class ERManagementTest extends ContextTest {
|
||||||
UUID createdUUID = createdHeader.getUUID();
|
UUID createdUUID = createdHeader.getUUID();
|
||||||
Assert.assertTrue(createdUUID!=null);
|
Assert.assertTrue(createdUUID!=null);
|
||||||
|
|
||||||
String creator = createdHeader.getCreator();
|
String createdBy = createdHeader.getCreatedBy();
|
||||||
Assert.assertTrue(creator!=null);
|
Assert.assertTrue(createdBy!=null);
|
||||||
|
|
||||||
String modifiedBy = createdHeader.getModifiedBy();
|
String lastUpdateBy = createdHeader.getLastUpdateBy();
|
||||||
Assert.assertTrue(modifiedBy!=null);
|
Assert.assertTrue(lastUpdateBy!=null);
|
||||||
|
|
||||||
Date creationTime = createdHeader.getCreationTime();
|
Date creationTime = createdHeader.getCreationTime();
|
||||||
Assert.assertTrue(creationTime!=null);
|
Assert.assertTrue(creationTime!=null);
|
||||||
|
@ -260,13 +260,13 @@ public class ERManagementTest extends ContextTest {
|
||||||
Assert.assertTrue(createdUUID.compareTo(header.getUUID())==0);
|
Assert.assertTrue(createdUUID.compareTo(header.getUUID())==0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(header.getCreator()!=null) {
|
if(header.getCreatedBy()!=null) {
|
||||||
Assert.assertTrue(creator.compareTo(header.getCreator())==0);
|
Assert.assertTrue(createdBy.compareTo(header.getCreatedBy())==0);
|
||||||
}else {
|
}else {
|
||||||
Assert.assertTrue(creator.compareTo(HeaderUtility.getUser())==0);
|
Assert.assertTrue(createdBy.compareTo(HeaderUtility.getUser())==0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(header.getModifiedBy()!=null) {
|
if(header.getLastUpdateBy()!=null) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -440,7 +440,7 @@ public class ERManagementTest extends ContextTest {
|
||||||
.compareTo((String) readCpuFacet.getAdditionalProperty(additionPropertyKey)) == 0);
|
.compareTo((String) readCpuFacet.getAdditionalProperty(additionPropertyKey)) == 0);
|
||||||
Assert.assertTrue(uuid.compareTo(updatedCpuFacet.getHeader().getUUID()) == 0);
|
Assert.assertTrue(uuid.compareTo(updatedCpuFacet.getHeader().getUUID()) == 0);
|
||||||
String user = AuthorizationProvider.instance.get().getClient().getId();
|
String user = AuthorizationProvider.instance.get().getClient().getId();
|
||||||
Assert.assertTrue(updatedCpuFacet.getHeader().getModifiedBy().compareTo(user) == 0);
|
Assert.assertTrue(updatedCpuFacet.getHeader().getLastUpdateBy().compareTo(user) == 0);
|
||||||
|
|
||||||
facetManagement = new FacetManagement();
|
facetManagement = new FacetManagement();
|
||||||
facetManagement.setUUID(uuid);
|
facetManagement.setUUID(uuid);
|
||||||
|
|
|
@ -49,10 +49,10 @@ public class FacetManagementTest extends ContextTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
String user = HeaderUtility.getUser();
|
String user = HeaderUtility.getUser();
|
||||||
Assert.assertTrue(er.getHeader().getModifiedBy().compareTo(user) == 0);
|
Assert.assertTrue(er.getHeader().getLastUpdateBy().compareTo(user) == 0);
|
||||||
|
|
||||||
if(create) {
|
if(create) {
|
||||||
Assert.assertTrue(er.getHeader().getCreator().compareTo(user) == 0);
|
Assert.assertTrue(er.getHeader().getCreatedBy().compareTo(user) == 0);
|
||||||
Assert.assertTrue(er.getHeader().getCreationTime().compareTo(er.getHeader().getLastUpdateTime()) == 0);
|
Assert.assertTrue(er.getHeader().getCreationTime().compareTo(er.getHeader().getLastUpdateTime()) == 0);
|
||||||
} else {
|
} else {
|
||||||
Assert.assertTrue(er.getHeader().getCreationTime().before(er.getHeader().getLastUpdateTime()));
|
Assert.assertTrue(er.getHeader().getCreationTime().before(er.getHeader().getLastUpdateTime()));
|
||||||
|
|
Loading…
Reference in New Issue