diff --git a/src/test/java/formflow/library/controllers/ScreenControllerTest.java b/src/test/java/formflow/library/controllers/ScreenControllerTest.java index a73389171..5f4e0a59f 100644 --- a/src/test/java/formflow/library/controllers/ScreenControllerTest.java +++ b/src/test/java/formflow/library/controllers/ScreenControllerTest.java @@ -101,7 +101,6 @@ public void modelIncludesCurrentSubflowItem() throws Exception { submission.setInputData(Map.of("testSubflow", List.of(subflowItem))); getPageExpectingSuccess("subflowAddItem/aaa-bbb-ccc"); } - } @Nested @@ -246,6 +245,4 @@ public void fieldsStillHaveValuesWhenFieldValidationFailsInSubflowPage2() throws assertEquals("Radio B", page2.getRadioValue("radioInputSubflowPage2")); assertEquals("Select C", page2.getSelectValue("selectInputSubflowPage2")); } - - } diff --git a/src/test/java/formflow/library/pdf/SubflowFieldPreparersTest.java b/src/test/java/formflow/library/pdf/SubflowFieldPreparersTest.java index 8b01b4255..422ebf0e6 100644 --- a/src/test/java/formflow/library/pdf/SubflowFieldPreparersTest.java +++ b/src/test/java/formflow/library/pdf/SubflowFieldPreparersTest.java @@ -50,42 +50,42 @@ void shouldNotMapIterationsInASubflowGreaterThanMaxIterations() { iteration1.put("foo", "the foo 1"); iteration1.put("bar", "the bar 1"); iteration1.put("uuid", "uuid1"); - iteration1.put(Submission.ITERATION_IS_COMPLETE_KEY, "true"); + iteration1.put(Submission.ITERATION_IS_COMPLETE_KEY, true); Map iteration2 = new HashMap<>(); iteration2.put("foo", "the foo 2"); iteration2.put("bar", "the bar 2"); iteration2.put("uuid", "uuid2"); - iteration2.put(Submission.ITERATION_IS_COMPLETE_KEY, "true"); + iteration2.put(Submission.ITERATION_IS_COMPLETE_KEY, true); Map iteration3 = new HashMap<>(); iteration3.put("foo", "the foo 3"); iteration3.put("bar", "the bar 3"); iteration3.put("uuid", "uuid3"); - iteration3.put(Submission.ITERATION_IS_COMPLETE_KEY, "true"); + iteration3.put(Submission.ITERATION_IS_COMPLETE_KEY, true); Map iteration4 = new HashMap<>(); iteration4.put("foo", "the foo 4"); iteration4.put("bar", "the bar 4"); iteration4.put("uuid", "uuid4"); - iteration4.put(Submission.ITERATION_IS_COMPLETE_KEY, "true"); + iteration4.put(Submission.ITERATION_IS_COMPLETE_KEY, true); Map iteration5 = new HashMap<>(); iteration5.put("foo", "the foo 5"); iteration5.put("bar", "the bar 5"); iteration5.put("uuid", "uuid5"); - iteration5.put(Submission.ITERATION_IS_COMPLETE_KEY, "true"); + iteration5.put(Submission.ITERATION_IS_COMPLETE_KEY, true); Map iteration6 = new HashMap<>(); iteration6.put("foo", "the foo 6"); iteration6.put("bar", "the bar 6"); iteration6.put("uuid", "uuid6"); - iteration6.put(Submission.ITERATION_IS_COMPLETE_KEY, "true"); + iteration6.put(Submission.ITERATION_IS_COMPLETE_KEY, true); Map iteration7 = new HashMap<>(); iteration7.put("foo", "the foo 7"); iteration7.put("bar", "the bar 7"); iteration7.put("uuid", "uuid7"); - iteration7.put(Submission.ITERATION_IS_COMPLETE_KEY, "true"); + iteration7.put(Submission.ITERATION_IS_COMPLETE_KEY, true); Map iteration8 = new HashMap<>(); iteration8.put("foo", "the foo 8"); iteration8.put("bar", "the bar 8"); iteration8.put("uuid", "uuid8"); - iteration8.put(Submission.ITERATION_IS_COMPLETE_KEY, "true"); + iteration8.put(Submission.ITERATION_IS_COMPLETE_KEY, true); submission = Submission.builder().flow("flow1") .inputData( Map.of( @@ -130,17 +130,17 @@ void submissionWithLessIterationsThanMaxIterationsShouldOnlyMapExistingIteration iteration1.put("foo", "the foo 1"); iteration1.put("bar", "the bar 1"); iteration1.put("uuid", "uuid1"); - iteration1.put(Submission.ITERATION_IS_COMPLETE_KEY, "true"); + iteration1.put(Submission.ITERATION_IS_COMPLETE_KEY, true); Map iteration2 = new HashMap<>(); iteration2.put("foo", "the foo 2"); iteration2.put("bar", "the bar 2"); iteration2.put("uuid", "uuid2"); - iteration2.put(Submission.ITERATION_IS_COMPLETE_KEY, "true"); + iteration2.put(Submission.ITERATION_IS_COMPLETE_KEY, true); Map iteration3 = new HashMap<>(); iteration3.put("foo", "the foo 3"); iteration3.put("bar", "the bar 3"); iteration3.put("uuid", "uuid3"); - iteration3.put(Submission.ITERATION_IS_COMPLETE_KEY, "true"); + iteration3.put(Submission.ITERATION_IS_COMPLETE_KEY, true); submission = Submission.builder().flow("flow1") .inputData( @@ -177,13 +177,13 @@ void shouldAddCorrectSuffixForCheckboxFieldsInSubflows() { iteration1.put("bar", "the bar 1"); iteration1.put("checkboxInput[]", List.of("item1", "item2", "item3")); iteration1.put("uuid", "uuid1"); - iteration1.put(Submission.ITERATION_IS_COMPLETE_KEY, "true"); + iteration1.put(Submission.ITERATION_IS_COMPLETE_KEY, true); Map iteration2 = new HashMap<>(); iteration2.put("foo", "the foo 2"); iteration2.put("bar", "the bar 2"); iteration2.put("checkboxInput[]", List.of("item1", "item2", "item3")); iteration2.put("uuid", "uuid2"); - iteration2.put(Submission.ITERATION_IS_COMPLETE_KEY, "true"); + iteration2.put(Submission.ITERATION_IS_COMPLETE_KEY, true); submission = Submission.builder().flow("flow1") .inputData( diff --git a/src/test/java/formflow/library/repository/SubmissionRepositoryServiceTest.java b/src/test/java/formflow/library/repository/SubmissionRepositoryServiceTest.java index 148d97a58..78a6ee27b 100644 --- a/src/test/java/formflow/library/repository/SubmissionRepositoryServiceTest.java +++ b/src/test/java/formflow/library/repository/SubmissionRepositoryServiceTest.java @@ -219,4 +219,4 @@ void shouldSetCreatedAtAndUpdatedAtFields() { assertThat(updatedSubmission.getUpdatedAt()).isInThePast(); assertThat(updatedSubmission.getUpdatedAt()).isNotEqualTo(savedSubmission.getUpdatedAt()); } -} \ No newline at end of file +}