dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #43846
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 22237: minor utility methods on object error reports
------------------------------------------------------------
revno: 22237
committer: Morten Olav Hansen <morten@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2016-03-10 20:24:10 +0700
message:
minor utility methods on object error reports
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/feedback/ObjectErrorReports.java
dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/metadata2/objectbundle/ObjectBundleServiceTest.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/feedback/ObjectErrorReports.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/feedback/ObjectErrorReports.java 2016-03-10 13:17:12 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/feedback/ObjectErrorReports.java 2016-03-10 13:24:10 +0000
@@ -80,4 +80,14 @@
{
return objectErrorReportsMap;
}
+
+ public boolean isEmpty()
+ {
+ return objectErrorReportsMap.isEmpty();
+ }
+
+ public int size()
+ {
+ return objectErrorReportsMap.size();
+ }
}
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/metadata2/objectbundle/ObjectBundleServiceTest.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/metadata2/objectbundle/ObjectBundleServiceTest.java 2016-03-10 13:17:12 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/metadata2/objectbundle/ObjectBundleServiceTest.java 2016-03-10 13:24:10 +0000
@@ -278,7 +278,7 @@
ObjectBundle bundle = objectBundleService.create( params );
ObjectBundleValidation validate = objectBundleService.validate( bundle );
- assertEquals( 3, validate.getObjectErrorReports( DataElement.class ).getObjectErrorReports().size() );
+ assertEquals( 3, validate.getObjectErrorReports( DataElement.class ).size() );
}
@Test
@@ -317,7 +317,7 @@
ObjectBundle bundle = objectBundleService.create( params );
ObjectBundleValidation validate = objectBundleService.validate( bundle );
- assertFalse( validate.getObjectErrorReports( DataElement.class ).getObjectErrorReports().isEmpty() );
+ assertFalse( validate.getObjectErrorReports( DataElement.class ).isEmpty() );
assertEquals( 3, validate.getErrorReportsByCode( DataElement.class, ErrorCode.E5001 ).size() );
}
@@ -336,7 +336,7 @@
ObjectBundle bundle = objectBundleService.create( params );
ObjectBundleValidation validate = objectBundleService.validate( bundle );
- assertFalse( validate.getObjectErrorReports( DataElement.class ).getObjectErrorReports().isEmpty() );
+ assertFalse( validate.getObjectErrorReports( DataElement.class ).isEmpty() );
assertEquals( 3, validate.getErrorReportsByCode( DataElement.class, ErrorCode.E5001 ).size() );
}
@@ -355,7 +355,7 @@
ObjectBundle bundle = objectBundleService.create( params );
ObjectBundleValidation validate = objectBundleService.validate( bundle );
- assertFalse( validate.getObjectErrorReports( DataElement.class ).getObjectErrorReports().isEmpty() );
+ assertFalse( validate.getObjectErrorReports( DataElement.class ).isEmpty() );
assertEquals( 3, validate.getErrorReportsByCode( DataElement.class, ErrorCode.E5001 ).size() );
}
@@ -374,7 +374,7 @@
ObjectBundle bundle = objectBundleService.create( params );
ObjectBundleValidation validate = objectBundleService.validate( bundle );
- assertFalse( validate.getObjectErrorReports( DataElement.class ).getObjectErrorReports().isEmpty() );
+ assertFalse( validate.getObjectErrorReports( DataElement.class ).isEmpty() );
assertEquals( 3, validate.getErrorReportsByCode( DataElement.class, ErrorCode.E5001 ).size() );
}
@@ -393,7 +393,7 @@
ObjectBundle bundle = objectBundleService.create( params );
ObjectBundleValidation validate = objectBundleService.validate( bundle );
- assertFalse( validate.getObjectErrorReports( DataElement.class ).getObjectErrorReports().isEmpty() );
+ assertFalse( validate.getObjectErrorReports( DataElement.class ).isEmpty() );
assertEquals( 3, validate.getErrorReportsByCode( DataElement.class, ErrorCode.E5001 ).size() );
}