diff options
Diffstat (limited to 'workflow-designer-be/src/test/java/org')
2 files changed, 13 insertions, 4 deletions
diff --git a/workflow-designer-be/src/test/java/org/onap/sdc/workflow/api/types/SortingTest.java b/workflow-designer-be/src/test/java/org/onap/sdc/workflow/api/types/SortingTest.java index 29436449..4aefad4f 100644 --- a/workflow-designer-be/src/test/java/org/onap/sdc/workflow/api/types/SortingTest.java +++ b/workflow-designer-be/src/test/java/org/onap/sdc/workflow/api/types/SortingTest.java @@ -18,11 +18,17 @@ public class SortingTest { @Test public void setSortInvalid() { - sorting.setSort("a"); + sorting.setSort("name:asc:a,:,"); assertEquals(Collections.emptyList(), sorting.getSorts()); } @Test + public void setSortAscByDefault() { + sorting.setSort("name"); + assertEquals(Collections.singletonList(new Sort("name", true)), sorting.getSorts()); + } + + @Test public void setSortAsc() { sorting.setSort("name:asc"); assertEquals(Collections.singletonList(new Sort("name", true)), sorting.getSorts()); @@ -36,7 +42,10 @@ public class SortingTest { @Test public void setSortMoreThanOne() { - sorting.setSort("name:asc,date:desc"); - assertEquals(Arrays.asList(new Sort("name", true), new Sort("date", false)), sorting.getSorts()); + sorting.setSort("name:asc,type,date:desc"); + assertEquals(Arrays.asList( + new Sort("name", true), + new Sort("type", true), + new Sort("date", false)), sorting.getSorts()); } }
\ No newline at end of file diff --git a/workflow-designer-be/src/test/java/org/onap/sdc/workflow/api/types/VersionStatesFormatterTest.java b/workflow-designer-be/src/test/java/org/onap/sdc/workflow/api/types/VersionStatesFormatterTest.java index c40aef3e..c4c6fbea 100644 --- a/workflow-designer-be/src/test/java/org/onap/sdc/workflow/api/types/VersionStatesFormatterTest.java +++ b/workflow-designer-be/src/test/java/org/onap/sdc/workflow/api/types/VersionStatesFormatterTest.java @@ -21,7 +21,7 @@ public class VersionStatesFormatterTest { @Test public void setVersionStateInvalid() { - versionStateSet.setVersionState("aaa"); + versionStateSet.setVersionState(",,a"); assertEquals(Collections.emptySet() ,versionStateSet.getVersionStates()); } |