File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/test/java/se/citerus/dddsample/interfaces/tracking/ws Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 1
1
package se .citerus .dddsample .interfaces .tracking .ws ;
2
2
3
+ import org .junit .jupiter .api .BeforeAll ;
3
4
import org .junit .jupiter .api .Test ;
4
5
import org .junit .jupiter .api .extension .ExtendWith ;
5
6
import org .springframework .boot .test .context .SpringBootTest ;
16
17
17
18
import java .net .URI ;
18
19
import java .nio .charset .StandardCharsets ;
20
+ import java .util .Locale ;
19
21
20
22
import static org .assertj .core .api .Assertions .assertThat ;
21
23
import static org .assertj .core .api .Assertions .fail ;
@@ -29,6 +31,13 @@ public class CargoTrackingRestServiceIntegrationTest {
29
31
30
32
private final RestTemplate restTemplate = new RestTemplate ();
31
33
34
+ @ BeforeAll
35
+ static void beforeClass () {
36
+ // The expected date time values in the resonse are formatted in US locale.
37
+ // Set the locale in the tests so that they won't fail in non-US locales such as Europe.
38
+ Locale .setDefault (Locale .US );
39
+ }
40
+
32
41
@ Transactional
33
42
@ Test
34
43
void shouldReturn200ResponseAndJsonWhenRequestingCargoWithIdABC123 () throws Exception {
You can’t perform that action at this time.
0 commit comments