Skip to content

Commit

Permalink
add unit test for negative min in description
Browse files Browse the repository at this point in the history
  • Loading branch information
nsenave committed May 21, 2024
1 parent 1c680f8 commit 4489952
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,21 @@ void withUnitNoDecimal() {
lunaticQuestionnaire.getComponents().getFirst().getDescription().getValue());
}

@Test
void negativeMin() {
//
Questionnaire lunaticQuestionnaire = new Questionnaire();
InputNumber inputNumber = new InputNumber();
inputNumber.setMin(-100d);
inputNumber.setMax(100d);
inputNumber.setDecimals(BigInteger.ZERO);
lunaticQuestionnaire.getComponents().add(inputNumber);
//
LunaticInputNumberDescription processing = new LunaticInputNumberDescription(EnoParameters.Language.FR);
processing.apply(lunaticQuestionnaire);
//
assertEquals("Format attendu : un nombre entre -100 et 100",
lunaticQuestionnaire.getComponents().getFirst().getDescription().getValue());
}

}

0 comments on commit 4489952

Please sign in to comment.