abstract class ModelAndViewAssert
A collection of assertions intended to simplify testing scenarios dealing with Spring Web MVC org.springframework.web.servlet.ModelAndView objects.
Intended for use with JUnit 4 and TestNG. All assert*() methods throw AssertionErrors.
Author
Sam Brannen
Author
Alef Arendsen
Author
Bram Smeets
Since
2.5
See Also
org.springframework.web.servlet.ModelAndView
ModelAndViewAssert()
A collection of assertions intended to simplify testing scenarios dealing with Spring Web MVC org.springframework.web.servlet.ModelAndView objects. Intended for use with JUnit 4 and TestNG. All |
open static fun <T : Any> assertAndReturnModelAttributeOfType(mav: ModelAndView, modelName: String, expectedType: Class<T>): T
Checks whether the model value under the given |
|
open static fun assertCompareListModelAttribute(mav: ModelAndView, modelName: String, expectedList: MutableList<Any?>): Unit
Compare each individual entry in a list, without first sorting the lists. |
|
open static fun assertModelAttributeAvailable(mav: ModelAndView, modelName: String): Unit
Assert whether or not a model attribute is available. |
|
open static fun assertModelAttributeValue(mav: ModelAndView, modelName: String, expectedValue: Any): Unit
Compare a given |
|
open static fun assertModelAttributeValues(mav: ModelAndView, expectedModel: MutableMap<String, Any>): Unit
Inspect the |
|
open static fun assertSortAndCompareListModelAttribute(mav: ModelAndView, modelName: String, expectedList: MutableList<Any?>, comparator: Comparator<Any>): Unit
Compare each individual entry in a list after having sorted both lists (optionally using a comparator). |
|
open static fun assertViewName(mav: ModelAndView, expectedName: String): Unit
Check to see if the view name in the ModelAndView matches the given |