This repository was archived by the owner on Dec 5, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
src/test/java/works/weave/socks/cart/controllers Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ package works .weave .socks .cart .controllers ;
2
+
3
+ import org .junit .Test ;
4
+ import org .junit .runner .RunWith ;
5
+ import org .springframework .beans .factory .annotation .Autowired ;
6
+ import org .springframework .context .annotation .Bean ;
7
+ import org .springframework .context .annotation .Configuration ;
8
+ import org .springframework .test .context .ContextConfiguration ;
9
+ import org .springframework .test .context .junit4 .SpringJUnit4ClassRunner ;
10
+
11
+ import static org .hamcrest .CoreMatchers .equalTo ;
12
+ import static org .hamcrest .CoreMatchers .is ;
13
+ import static org .hamcrest .collection .IsCollectionWithSize .hasSize ;
14
+ import static org .hamcrest .collection .IsEmptyCollection .empty ;
15
+ import static org .hamcrest .collection .IsIterableContainingInAnyOrder .containsInAnyOrder ;
16
+ import static org .junit .Assert .assertThat ;
17
+
18
+ import works .weave .socks .cart .entities .HealthCheck ;
19
+
20
+ import java .util .ArrayList ;
21
+ import java .util .Calendar ;
22
+ import java .util .Date ;
23
+ import java .util .HashMap ;
24
+ import java .util .List ;
25
+ import java .util .Map ;
26
+
27
+ @ RunWith (SpringJUnit4ClassRunner .class )
28
+ @ ContextConfiguration
29
+ public class UnitHealthCheckController {
30
+
31
+ @ Autowired
32
+ private HealthCheckController healthCheckController ;
33
+
34
+ @ Test
35
+ public void shouldGetHealth () {
36
+ Map <String , List <HealthCheck >> results = healthCheckController .getHealth ();
37
+ assertThat (results .get ("health" ).size (), is (equalTo (2 )));
38
+ }
39
+ }
You can’t perform that action at this time.
0 commit comments