Commit bc33abb
committed
test: adopt BDD Given-When-Then pattern across all tests
- Rename all test methods to givenX_whenY_thenZ() format
- Replace AssertJ assertThat() with BDDAssertions then()
- Update code comments from Arrange/Act/Assert to Given/When/Then
- Apply semantic variable naming (expected/actual for assertions, dto/entity for setup)
- Eliminate magic strings/numbers from assertions
- Update all JavaDocs to abstract business descriptions
- Ensure comprehensive object comparisons using usingRecursiveComparison()
- Reorder test methods to match controller/service method order
- Refactor searchBySquadNumber to retrieveBySquadNumber (RESTful GET pattern)1 parent 1bc2d5a commit bc33abb
6 files changed
Lines changed: 577 additions & 559 deletions
File tree
- src
- main/java/ar/com/nanotaboada/java/samples/spring/boot
- controllers
- repositories
- services
- test/java/ar/com/nanotaboada/java/samples/spring/boot/test
- controllers
- repositories
- services
Lines changed: 33 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
116 | 134 | | |
117 | 135 | | |
118 | 136 | | |
| |||
133 | 151 | | |
134 | 152 | | |
135 | 153 | | |
136 | | - | |
| 154 | + | |
137 | 155 | | |
138 | | - | |
| 156 | + | |
| 157 | + | |
139 | 158 | | |
140 | 159 | | |
141 | | - | |
| 160 | + | |
| 161 | + | |
142 | 162 | | |
143 | | - | |
144 | | - | |
| 163 | + | |
| 164 | + | |
145 | 165 | | |
146 | | - | |
| 166 | + | |
| 167 | + | |
147 | 168 | | |
148 | | - | |
149 | | - | |
150 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
151 | 174 | | |
152 | 175 | | |
153 | 176 | | |
| |||
169 | 192 | | |
170 | 193 | | |
171 | 194 | | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | 195 | | |
197 | 196 | | |
198 | 197 | | |
| |||
Lines changed: 14 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | 43 | | |
58 | 44 | | |
59 | 45 | | |
| |||
67 | 53 | | |
68 | 54 | | |
69 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
70 | 70 | | |
Lines changed: 27 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
113 | 131 | | |
114 | 132 | | |
115 | 133 | | |
| |||
130 | 148 | | |
131 | 149 | | |
132 | 150 | | |
133 | | - | |
| 151 | + | |
134 | 152 | | |
135 | | - | |
136 | | - | |
| 153 | + | |
| 154 | + | |
137 | 155 | | |
138 | 156 | | |
139 | | - | |
| 157 | + | |
| 158 | + | |
140 | 159 | | |
141 | 160 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
146 | 164 | | |
147 | | - | |
| 165 | + | |
148 | 166 | | |
149 | 167 | | |
150 | 168 | | |
| |||
170 | 188 | | |
171 | 189 | | |
172 | 190 | | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | 191 | | |
190 | 192 | | |
191 | 193 | | |
| |||
0 commit comments