dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #43825
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 22221: minor test fixes
------------------------------------------------------------
revno: 22221
committer: Morten Olav Hansen <morten@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2016-03-10 13:13:47 +0700
message:
minor test fixes
modified:
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/resources/dxf2/metadata_with_vr.json
--
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-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 06:06:01 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/metadata2/objectbundle/ObjectBundleServiceTest.java 2016-03-10 06:13:47 +0000
@@ -1023,13 +1023,19 @@
assertFalse( dataElements.isEmpty() );
assertFalse( users.isEmpty() );
assertFalse( userRoles.isEmpty() );
- assertEquals( 1, validationRules.size() );
-
- ValidationRule validationRule = validationRules.get( 0 );
- assertNotNull( validationRule.getLeftSide() );
- assertNotNull( validationRule.getRightSide() );
- assertFalse( validationRule.getLeftSide().getDataElementsInExpression().isEmpty() );
- assertFalse( validationRule.getRightSide().getDataElementsInExpression().isEmpty() );
+ assertEquals( 2, validationRules.size() );
+
+ ValidationRule validationRule1 = validationRules.get( 0 );
+ assertNotNull( validationRule1.getLeftSide() );
+ assertNotNull( validationRule1.getRightSide() );
+ assertFalse( validationRule1.getLeftSide().getDataElementsInExpression().isEmpty() );
+ assertFalse( validationRule1.getRightSide().getDataElementsInExpression().isEmpty() );
+
+ ValidationRule validationRule2 = validationRules.get( 1 );
+ assertNotNull( validationRule2.getLeftSide() );
+ assertNotNull( validationRule2.getRightSide() );
+ assertFalse( validationRule2.getLeftSide().getDataElementsInExpression().isEmpty() );
+ assertFalse( validationRule2.getRightSide().getDataElementsInExpression().isEmpty() );
}
private void defaultSetup()
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/test/resources/dxf2/metadata_with_vr.json'
--- dhis-2/dhis-services/dhis-service-dxf2/src/test/resources/dxf2/metadata_with_vr.json 2016-03-10 06:06:01 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/test/resources/dxf2/metadata_with_vr.json 2016-03-10 06:13:47 +0000
@@ -339,6 +339,37 @@
"description": "ValidationRuleA",
"operator": "equal_to",
"ruleType": "VALIDATION"
+ },
+ {
+ "leftSide": {
+ "description": "Left Side",
+ "expression": "#{jocQSivF2ry.NQigT2ThzgD}",
+ "dataElements": [
+ {
+ "id": "jocQSivF2ry"
+ }
+ ],
+ "missingValueStrategy": "SKIP_IF_ANY_VALUE_MISSING"
+ },
+ "importance": "MEDIUM",
+ "rightSide": {
+ "description": "Right Side",
+ "expression": "#{X0ypiOyoDbw.NQigT2ThzgD}",
+ "dataElements": [
+ {
+ "id": "X0ypiOyoDbw"
+ }
+ ],
+ "missingValueStrategy": "SKIP_IF_ANY_VALUE_MISSING"
+ },
+ "name": "ValidationRuleB",
+ "lastUpdated": "2016-03-10T05:09:40.689+0000",
+ "periodType": "Monthly",
+ "id": "TGvH4Hiyduc",
+ "created": "2016-03-10T05:09:40.688+0000",
+ "description": "ValidationRuleB",
+ "operator": "equal_to",
+ "ruleType": "VALIDATION"
}
]
}