fixed again, thanks Alex for your detailed reviews I have learned alot :)

This commit is contained in:
-
2019-03-19 17:44:53 -06:00
parent f0cb7633c6
commit 5479130178
8 changed files with 35 additions and 71 deletions
@@ -23,27 +23,19 @@ public class TheoremEntryControllerTest {
@InjectMocks
private TheoremEntryController theoremEntryController;
@Autowired
protected MockMvc mockMvc;
@Test
public void contexLoads() throws Exception {
assertNotNull(theoremEntryController);
}
@Test
public void firstPage(){
final ModelAndView modelAndView= theoremEntryController.firstPage();
assertNotNull(modelAndView);
assertEquals("welcome",modelAndView.getViewName());
}
@Test
public void theoremPage(){
final ModelAndView modelAndView= theoremEntryController.theoremPage();
final ModelAndView modelAndView= theoremEntryController.enterTheoremPage();
assertNotNull(modelAndView);
assertEquals("Theorem",modelAndView.getViewName());
}
@Test
public void saveTheorem(){
final ModelAndView modelAndView= theoremEntryController.enterTheoremPage();
assertNotNull(modelAndView);
assertEquals("Theorem",modelAndView.getViewName());