Skip to content

Commit 2d37ba9

Browse files
Merge pull request #10 from amido/fix/unit-test-tags-and-pr-template
Added Test Tags where missing and also PR Template
2 parents 2b02f11 + eec318f commit 2d37ba9

File tree

4 files changed

+55
-21
lines changed

4 files changed

+55
-21
lines changed

.github/pull_request_template.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[XXXX-<Title> - Please use the Work Item number and Title as PR Name, not subtasks]
2+
3+
#### 📲 What
4+
5+
A description of the change.
6+
7+
#### 🤔 Why
8+
9+
Why it's needed, background context.
10+
11+
#### 🛠 How
12+
13+
More in-depth discussion of the change or implementation.
14+
15+
#### 👀 Evidence
16+
17+
Screenshots / external resources / links / etc.
18+
Link to documentation updated with changes impacted in the PR
19+
20+
#### 🕵️ How to test
21+
22+
Notes for QA
23+
24+
#### ✅ Acceptance criteria Checklist
25+
26+
- [ ] Code peer reviewed?
27+
- [ ] Documentation has been updated to reflect the changes?
28+
- [ ] Passing all automated tests, including a successful deployment?
29+
- [ ] Passing any exploratory testing?
30+
- [ ] Rebased/merged with latest changes from development and re-tested?
31+
- [ ] Meeting the Coding Standards?
32+
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package com.xxAMIDOxx.xxSTACKSxx.api.v1.menu.dto;
22

33
import nl.jqno.equalsverifier.EqualsVerifier;
4+
import org.junit.jupiter.api.Tag;
45
import org.junit.jupiter.api.Test;
56

6-
import static org.junit.jupiter.api.Assertions.*;
7-
7+
@Tag("Unit")
88
class SearchMenuResultItemTest {
99

1010
@Test
1111
void testEquals() {
12-
EqualsVerifier.simple().forClass(SearchMenuResult.class).verify();
12+
EqualsVerifier.simple().forClass(SearchMenuResultItem.class).verify();
1313
}
1414
}

java/src/test/java/com/xxAMIDOxx/xxSTACKSxx/api/v1/menu/dto/SearchMenuResultTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
package com.xxAMIDOxx.xxSTACKSxx.api.v1.menu.dto;
22

33
import nl.jqno.equalsverifier.EqualsVerifier;
4+
import org.junit.jupiter.api.Tag;
45
import org.junit.jupiter.api.Test;
56

7+
@Tag("Unit")
68
class SearchMenuResultTest {
79

810
@Test

java/src/test/java/com/xxAMIDOxx/xxSTACKSxx/api/v1/menu/impl/MenuControllerImplTest.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -100,23 +100,6 @@ public void returnMenuWhenSearchById() {
100100
then(response.getBody()).isEqualTo(menu);
101101
}
102102

103-
private List<Menu> createMenus(int count) {
104-
List<Menu> menuList = new ArrayList<>();
105-
for (int i = 0; i < count; i++) {
106-
menuList.add(createMenu(i));
107-
}
108-
return menuList;
109-
}
110-
111-
private Menu createMenu(int counter) {
112-
return aMenu()
113-
.withDescription(counter + " Menu Description")
114-
.withEnabled(true)
115-
.withName(counter + " Menu")
116-
.withId(UUID.randomUUID().toString())
117-
.build();
118-
}
119-
120103
@Test
121104
public void testWhenPageSizeAndNoGetsDefaultedWhenNoValueGiven() {
122105
// Given
@@ -185,4 +168,21 @@ public void testWhenNoRestaurantIdGivenReturnsAllResults() {
185168
assertThat(actual.getPageSize(), is(20));
186169
assertThat(actual.getResults(), is(notNullValue()));
187170
}
188-
}
171+
172+
private List<Menu> createMenus(int count) {
173+
List<Menu> menuList = new ArrayList<>();
174+
for (int i = 0; i < count; i++) {
175+
menuList.add(createMenu(i));
176+
}
177+
return menuList;
178+
}
179+
180+
private Menu createMenu(int counter) {
181+
return aMenu()
182+
.withDescription(counter + " Menu Description")
183+
.withEnabled(true)
184+
.withName(counter + " Menu")
185+
.withId(UUID.randomUUID().toString())
186+
.build();
187+
}
188+
}

0 commit comments

Comments
 (0)