-
Notifications
You must be signed in to change notification settings - Fork 676
Expand file tree
/
Copy pathIndexControllerTest.java
More file actions
32 lines (25 loc) · 858 Bytes
/
IndexControllerTest.java
File metadata and controls
32 lines (25 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package guru.springframework.sfgpetclinic.controllers;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
class IndexControllerTest {
IndexController controller;
// new_branch
@BeforeEach
void setUp() {
controller = new IndexController();
}
@Test
void index() {
assertEquals("index", controller.index());
assertEquals("index", controller.index(), "Wrong View Returned");
assertEquals("index", controller.index(),
() -> "Another Expensive Message " + "Make me only if you have to");
}
@Test
void oupsHandler() {
assertTrue("notimplemented".equals(controller.oupsHandler()),
() -> "This is some expensive " + "Message to build" + "for my test");
}
}