-
Book Overview & Buying
-
Table Of Contents
Mockito for Spring
By :
The Spring Framework provides a set of Spring-specific annotations for unit and integration tests in conjunction with the TestContext framework. The following are widely used annotations:
@ContextConfiguration: We have already covered this annotation and loaded applicationContext for integration tests. This annotation is used to determine how to load and configure an ApplicationContext for integration tests. @ContextConfiguration declares the application context's resource locations or the annotated classes that will be used to load the context.
@WebAppConfiguration: This class-level annotation is used to instruct the Spring context that the ApplicationContext loaded using the @ContextConfiguration annotation is a WebApplicationContext. We will use WebApplicationContext in the next section.
@ContextHierarchy: This is a class-level annotation that loads the parent-child application context in hierarchical order. The following integration test declares a context hierarchy...
Change the font size
Change margin width
Change background colour