万本电子书0元读

万本电子书0元读

顶部广告

Mockito for Spring电子书

售       价:¥

11人正在读 | 0人评论 9.8

作       者:Sujoy Acharya

出  版  社:Packt Publishing

出版时间:2015-02-25

字       数:92.3万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
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.
目录展开

Mockito for Spring

Table of Contents

Mockito for Spring

Credits

About the Author

About the Reviewers

www.PacktPub.com

Support files, eBooks, discount offers, and more

Why subscribe?

Free access for Packt account holders

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

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 transaction

Exploring transaction attributes

Using the @Transactional annotation

Working with a programmatic Spring transaction

Using TransactionTemplate

Using PlatformTransactionManager

Building an MVC application with Spring

Summary

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 not

Exploring 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

Verifying in depth

Verifying zero and no more interactions

Throwing exceptions

Summary

3. Working with Spring Tests

Exploring the TestContext framework

Writing a custom TestExecutionListener interface

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

Summary

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

5. Time Travelling with Spring

Discovering the new Spring release

Working with asynchronous tasks

Exploring @RestController

Learning AsyncRestTemplate

Caching objects

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部