Showing
3 changed files
with
9 additions
and
9 deletions
... | @@ -47,7 +47,7 @@ public class ListPublisherActionsViewTest { | ... | @@ -47,7 +47,7 @@ public class ListPublisherActionsViewTest { |
47 | } | 47 | } |
48 | 48 | ||
49 | @Test | 49 | @Test |
50 | - @DisplayName("should show all") | 50 | + @DisplayName("when publisher is not set, should be in all actions no filter state") |
51 | public void showAll(@Mock PublisherService publisherServiceMock) { | 51 | public void showAll(@Mock PublisherService publisherServiceMock) { |
52 | listPublisherActionsView.setPublisherId(null); | 52 | listPublisherActionsView.setPublisherId(null); |
53 | listPublisherActionsView.setViewAll(false); | 53 | listPublisherActionsView.setViewAll(false); |
... | @@ -58,7 +58,7 @@ public class ListPublisherActionsViewTest { | ... | @@ -58,7 +58,7 @@ public class ListPublisherActionsViewTest { |
58 | } | 58 | } |
59 | 59 | ||
60 | @Test | 60 | @Test |
61 | - @DisplayName("should show filtered") | 61 | + @DisplayName("when publisher is set, should be in filtered not all actions state") |
62 | public void showFiltered(@Mock PublisherService publisherServiceMock) { | 62 | public void showFiltered(@Mock PublisherService publisherServiceMock) { |
63 | listPublisherActionsView.setPublisherId(1); | 63 | listPublisherActionsView.setPublisherId(1); |
64 | listPublisherActionsView.setViewAll(true); | 64 | listPublisherActionsView.setViewAll(true); |
... | @@ -70,7 +70,7 @@ public class ListPublisherActionsViewTest { | ... | @@ -70,7 +70,7 @@ public class ListPublisherActionsViewTest { |
70 | } | 70 | } |
71 | 71 | ||
72 | @Test | 72 | @Test |
73 | - @DisplayName("filterId should filter") | 73 | + @DisplayName("when publisher is set, should show only its actions") |
74 | public void testFilter(@Mock PublisherService publisherServiceMock) { | 74 | public void testFilter(@Mock PublisherService publisherServiceMock) { |
75 | List<PublisherAction> publisherActions = new ArrayList<PublisherAction>(); | 75 | List<PublisherAction> publisherActions = new ArrayList<PublisherAction>(); |
76 | 76 | ... | ... |
... | @@ -76,7 +76,7 @@ public class ListPublisherVersionsViewTest { | ... | @@ -76,7 +76,7 @@ public class ListPublisherVersionsViewTest { |
76 | } | 76 | } |
77 | 77 | ||
78 | @Test | 78 | @Test |
79 | - @DisplayName("List of all versions") | 79 | + @DisplayName("when publisher is not set, should list all versions") |
80 | public void testSetViewAll() { | 80 | public void testSetViewAll() { |
81 | listPublisherVersionsView.setPublisherId(null); | 81 | listPublisherVersionsView.setPublisherId(null); |
82 | listPublisherVersionsView.setView(); | 82 | listPublisherVersionsView.setView(); |
... | @@ -86,7 +86,7 @@ public class ListPublisherVersionsViewTest { | ... | @@ -86,7 +86,7 @@ public class ListPublisherVersionsViewTest { |
86 | } | 86 | } |
87 | 87 | ||
88 | @Test | 88 | @Test |
89 | - @DisplayName("List of a pulisher's versions") | 89 | + @DisplayName("when publisher is set, should list pulisher's versions") |
90 | public void testSetViewNotAllAlsoTestingFilterOnId() { | 90 | public void testSetViewNotAllAlsoTestingFilterOnId() { |
91 | listPublisherVersionsView.setPublisherId(1); | 91 | listPublisherVersionsView.setPublisherId(1); |
92 | listPublisherVersionsView.setView(); | 92 | listPublisherVersionsView.setView(); |
... | @@ -96,7 +96,7 @@ public class ListPublisherVersionsViewTest { | ... | @@ -96,7 +96,7 @@ public class ListPublisherVersionsViewTest { |
96 | } | 96 | } |
97 | 97 | ||
98 | @Test | 98 | @Test |
99 | - @DisplayName("Validates a publisher version using service") | 99 | + @DisplayName("when validating a publisher version, should call service method") |
100 | public void testValidate() { | 100 | public void testValidate() { |
101 | listPublisherVersionsView.setPublisherId(0); | 101 | listPublisherVersionsView.setPublisherId(0); |
102 | listPublisherVersionsView.validate(publisherVersion2); | 102 | listPublisherVersionsView.validate(publisherVersion2); |
... | @@ -104,13 +104,13 @@ public class ListPublisherVersionsViewTest { | ... | @@ -104,13 +104,13 @@ public class ListPublisherVersionsViewTest { |
104 | } | 104 | } |
105 | 105 | ||
106 | @Test | 106 | @Test |
107 | - @DisplayName("Gets last validate for a publisher") | 107 | + @DisplayName("when requested the last validate for a publisher, should call service method") |
108 | public void testGetLastValidate() { | 108 | public void testGetLastValidate() { |
109 | assertThat(listPublisherVersionsView.getLastValidate(publisher)).isEqualTo(publisherAction); | 109 | assertThat(listPublisherVersionsView.getLastValidate(publisher)).isEqualTo(publisherAction); |
110 | } | 110 | } |
111 | 111 | ||
112 | @Test | 112 | @Test |
113 | - @DisplayName("Returns null when publisher has no validate action") | 113 | + @DisplayName("when requested the last validate for a publisher that has none, should get null") |
114 | public void testGetLastValidateNull() { | 114 | public void testGetLastValidateNull() { |
115 | assertThat(listPublisherVersionsView.getLastValidate(publisher1)).isNull(); | 115 | assertThat(listPublisherVersionsView.getLastValidate(publisher1)).isNull(); |
116 | } | 116 | } | ... | ... |
... | @@ -37,7 +37,7 @@ public class AddCountryViewTest { | ... | @@ -37,7 +37,7 @@ public class AddCountryViewTest { |
37 | } | 37 | } |
38 | 38 | ||
39 | @Test | 39 | @Test |
40 | - @DisplayName("uses the SharedService add with right argument") | 40 | + @DisplayName("should use the SharedService with right argument when a country is added") |
41 | public void testSharedServiceAdd(@Mock SharedService sharedServiceMock) { | 41 | public void testSharedServiceAdd(@Mock SharedService sharedServiceMock) { |
42 | Mockito.verify(sharedServiceMock).addCountry(countryArgumentCaptor.capture()); | 42 | Mockito.verify(sharedServiceMock).addCountry(countryArgumentCaptor.capture()); |
43 | Country country = countryArgumentCaptor.getValue(); | 43 | Country country = countryArgumentCaptor.getValue(); | ... | ... |
-
Please register or login to post a comment