Mockito for Spring : learn all you need to know about the Spring Framework and how to unit test your projects with Mockito /
If you are an application developer with some experience in software testing and want to learn more about testing frameworks, then this technology and book is for you. Mockito for Spring will be perfect as your next step towards becoming a competent software tester with Spring and Mockito.
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham, UK :
Packt Publishing,
2015.
|
Colección: | Community experience distilled.
|
Temas: | |
Acceso en línea: | Texto completo (Requiere registro previo con correo institucional) |
Tabla de Contenidos:
- Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Getting Familiar with the Spring Framework; Getting started with Spring; Exploring the Spring architecture; The core container; The AOP module; The instrumentation module; The messaging module; The data access module; The web layer; The test module; 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
- Working with declarative Spring transactionExploring transaction attributes; Using the @Transactional annotation; Working with a programmatic Spring transaction; Using TransactionTemplate; Using PlatformTransactionManager; Building an MVC application with Spring; Summary; Chapter 2: Working with JUnit and Mockito; Learning unit testing; Working with the JUnit framework; Configuring Eclipse; Examining annotations; Verifying an expectation with an assertion; Examining exception handling; Working with the @RunWith annotation; Working with test suites; Working with assertThat
- Exploring equalTo, is, and notExploring compound matchers
- either, both, anyOf, and allOf; Exploring collection matchers
- hasItem and hasItems; Working with string matchers
- startsWith, endsWith, and containsString; Exploring custom matchers; Working with Mockito; Learning the significance of Mockito; Exploring Mockito; Configuring Mockito; Mocking in action; Mocking objects; Stubbing methods; Throwing exceptions; Summary; Chapter 3: Working with Spring Tests; Exploring the TestContext framework; Writing a custom TestExecutionListener interface; Configuring Spring profiles
- Mocking an environmentMocking the JNDI lookup; Using ReflectionTestUtils; Working with annotations; Testing Spring MVC; Mocking the servlet container with MockMvc; Handling transactions in Spring tests; Summary; 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; Summary; Chapter 5: Time Travelling with Spring; Discovering the new Spring release; Working with asynchronous tasks; Exploring @RestController; Learning AsyncRestTemplate; Caching objects; Summary; Index