Skip to content

Commit

Permalink
Task #176 add test case for overwrite flag
Browse files Browse the repository at this point in the history
  • Loading branch information
fran_tb authored and fran_tb committed Aug 14, 2023
1 parent 9dc92ba commit d09cd23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public void testSetNumberLiteral() {
assertEquals("Case parameter = numberLiteral: Default Value Set Correctly", Double.valueOf(nl.getValue()), parameter.getDefaultValue(), TEST_EPSILON);
double newIdleValue = parameter.getModeValues().get(0).getValue();
assertEquals("Case parameter = numberLiteral: Idle Value Set Correctly", Double.valueOf(nl.getValue()), newIdleValue, TEST_EPSILON);
assertEquals("Make sure equation engine sets overwrite flag", parameter.getDefaultValueBean().getOverride(), true);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ private List<EvaluationProblem> set(CategoryAssignment ca, NumberLiteralResult r

UnitValuePropertyInstance pviDefault = (UnitValuePropertyInstance) parameter.getDefaultValueBean().getTypeInstance();
setProblems.addAll(nls.set(pviDefault, result));
pviDefault.setOverride(true);

// Assign the value to the additional modes

Expand Down

0 comments on commit d09cd23

Please sign in to comment.