更新时间:2021-07-23 20:38:06
coverpage
Mockito for Spring
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files eBooks discount offers and more
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Chapter 1. Getting Familiar with the Spring Framework
Getting started with Spring
Exploring the Spring architecture
Learning the Inversion of Control
Printing Hello World
Examining life cycle messages
Working with autowiring and annotations
Working with aspects
Exploring Spring JDBC
Handling a transaction with Spring
Building an MVC application with Spring
Summary
Chapter 2. Working with JUnit and Mockito
Learning unit testing
Working with the JUnit framework
Working with Mockito
Exploring Mockito
Chapter 3. Working with Spring Tests
Exploring the TestContext framework
Configuring Spring profiles
Mocking an environment
Mocking the JNDI lookup
Using ReflectionTestUtils
Working with annotations
Testing Spring MVC
Mocking the servlet container with MockMvc
Handling transactions in Spring tests
Chapter 4. Resolving Out-of-container Dependencies with Mockito
Unit testing the web layer
Unit testing the service layer
Unit testing the data access layer
Chapter 5. Time Travelling with Spring
Discovering the new Spring release
Working with asynchronous tasks
Exploring @RestController
Learning AsyncRestTemplate
Caching objects
Index