Skip to content

Commit

Permalink
Name test constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippluca committed Dec 8, 2022
1 parent 9aba1d2 commit dd5a94e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/test/data/GetInGroups/SetConstraintAll.ili
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ MODEL TestSuite
textAttr: TEXT*16;
enumAttr: (val1,val2,val3);
numberAttr: 0..10;
SET CONSTRAINT INTERLIS.elementCount(GeoW_FunctionsExt.GetInGroups(ALL, "textAttr")) == 3;
SET CONSTRAINT INTERLIS.elementCount(GeoW_FunctionsExt.GetInGroups(ALL, "enumAttr")) == 3;
SET CONSTRAINT INTERLIS.elementCount(GeoW_FunctionsExt.GetInGroups(ALL, "numberAttr")) == 3;
SET CONSTRAINT INTERLIS.elementCount(GeoW_FunctionsExt.GetInGroups(ALL, "textAttr")) == 2;
SET CONSTRAINT INTERLIS.elementCount(GeoW_FunctionsExt.GetInGroups(ALL, "enumAttr")) == 2;
SET CONSTRAINT INTERLIS.elementCount(GeoW_FunctionsExt.GetInGroups(ALL, "numberAttr")) == 2;
SET CONSTRAINT trueConstraintTextAttr: INTERLIS.elementCount(GeoW_FunctionsExt.GetInGroups(ALL, "textAttr")) == 3;
SET CONSTRAINT trueConstraintEnumAttr: INTERLIS.elementCount(GeoW_FunctionsExt.GetInGroups(ALL, "enumAttr")) == 3;
SET CONSTRAINT trueConstraintNumberAttr: INTERLIS.elementCount(GeoW_FunctionsExt.GetInGroups(ALL, "numberAttr")) == 3;
SET CONSTRAINT falseConstraintTextAttr: INTERLIS.elementCount(GeoW_FunctionsExt.GetInGroups(ALL, "textAttr")) == 2;
SET CONSTRAINT falseConstraintEnumAttr: INTERLIS.elementCount(GeoW_FunctionsExt.GetInGroups(ALL, "enumAttr")) == 2;
SET CONSTRAINT falseConstraintNumberAttr: INTERLIS.elementCount(GeoW_FunctionsExt.GetInGroups(ALL, "numberAttr")) == 2;
END BaseClass;

END FunctionTestTopic;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ void setUp() {
void MandatoryConstraintOnThis() throws Ili2cFailure, IoxException {
vh.runValidation(new String[]{TEST_DATA}, new String[]{"GetInGroups/SetConstraintAll.ili"});
Assert.equals(3, vh.getErrs().size());
AssertionHelper.assertNoConstraintError(vh, "Constraint1");
AssertionHelper.assertNoConstraintError(vh, "Constraint2");
AssertionHelper.assertNoConstraintError(vh, "Constraint3");
AssertionHelper.assertSingleConstraintError(vh, 0, "Constraint4");
AssertionHelper.assertSingleConstraintError(vh, 0, "Constraint5");
AssertionHelper.assertSingleConstraintError(vh, 0, "Constraint6");
AssertionHelper.assertNoConstraintError(vh, "trueConstraintTextAttr");
AssertionHelper.assertNoConstraintError(vh, "trueConstraintEnumAttr");
AssertionHelper.assertNoConstraintError(vh, "trueConstraintNumberAttr");
AssertionHelper.assertSingleConstraintError(vh, 0, "falseConstraintTextAttr");
AssertionHelper.assertSingleConstraintError(vh, 0, "falseConstraintEnumAttr");
AssertionHelper.assertSingleConstraintError(vh, 0, "falseConstraintNumberAttr");
}
}

0 comments on commit dd5a94e

Please sign in to comment.