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