lundi 14 novembre 2016

How to test simple Spring controller?

This is how my controller looks. What's the goal of testing it and how to do it?

@Controller public class MainController {

@Autowired
private WeatherStateRepositoryDAO weatherStateRepositoryDAO;


@RequestMapping("/")
public String mainPage(Model model) {
    model.addAttribute("list", weatherStateRepositoryDAO.findAll());
    return "index";
}

}

Aucun commentaire:

Enregistrer un commentaire