舉報

會員
Mockito Cookbook
最新章節:
Index
Thisisafocusedguidewithlotsofpracticalrecipeswithpresentationsofbusinessissuesandpresentationofthewholetestofthesystem.ThisbookshowstheuseofMockito'spopularunittestingframeworkssuchasJUnit,PowerMock,TestNG,andsoon.Ifyouareasoftwaredeveloperwithnotestingexperience(especiallywithMockito)andyouwanttostartusingMockitointhemostefficientwaythenthisbookisforyou.ThisbookassumesthatyouhaveagoodknowledgelevelandunderstandingofJava-basedunittestingframeworks.
目錄(101章)
倒序
- coverpage
- Mockito Cookbook
- 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 Started with Mockito
- Introduction
- Adding Mockito to a project's classpath
- Getting started with Mockito for JUnit
- Getting started with Mockito for TestNG
- Mockito best practices – test behavior not implementation
- Adding Mockito hints to exception messages (JUnit) (Experimental)
- Adding additional Mockito warnings to your tests (JUnit) (Experimental)
- Chapter 2. Creating Mocks
- Introduction
- Creating mocks in code
- Creating mocks with annotations
- Creating mocks with a different default answer
- Creating mocks with different default answers with annotations
- Creating mocks with custom configuration
- Creating mocks of final classes with PowerMock
- Creating mocks of enums with PowerMock
- Chapter 3. Creating Spies and Partial Mocks
- Introduction
- Creating spies in code
- Creating spies with custom configuration
- Creating spies using annotations
- Creating partial mocks
- Creating partial mocks of final classes with delegatesTo()
- Creating spies of final classes with PowerMock
- Chapter 4. Stubbing Behavior of Mocks
- Introduction
- Using argument matchers for stubbing
- Stubbing methods that return values
- Stubbing methods so that they throw exceptions
- Stubbing methods so that they return custom answers
- Stubbing methods so that they call real methods
- Stubbing void methods
- Stubbing void methods so that they throw exceptions
- Stubbing void methods so that they return custom answers
- Stubbing void methods so that they call real methods
- Stubbing final methods with PowerMock
- Stubbing static methods with PowerMock
- Stubbing object instantiation using PowerMock
- Chapter 5. Stubbing Behavior of Spies
- Introduction
- Stubbing methods that return values
- Stubbing methods so that they throw exceptions
- Stubbing methods so that they return custom answers
- Stubbing void methods
- Stubbing void methods so that they throw exceptions
- Stubbing void methods so that they return custom answers
- Stubbing final methods with PowerMock
- Chapter 6. Verifying Test Doubles
- Introduction
- Verifying the method invocation count with times()
- Verifying the method invocation count with atLeast()
- Verifying the method invocation count with atMost()
- Verifying that interactions never happened
- Verifying that interactions stopped happening
- Verifying the order of interactions
- Verifying interactions and ignoring stubbed methods
- Verifying the method invocation within the specified time
- Chapter 7. Verifying Behavior with Object Matchers
- Introduction
- Using Hamcrest matchers for assertions
- Creating custom Hamcrest matchers
- Using Hamcrest matchers for stubbing and verification
- Using AssertJ for assertions
- Creating custom AssertJ assertions
- Capturing and asserting the argument
- Chapter 8. Refactoring with Mockito
- Introduction
- Removing the problems with instance creation
- Refactoring classes that do too much
- Refactoring the classes that use the class casts
- Refactoring the classes that use static methods
- Refactoring the tests that use too many mocks
- Chapter 9. Integration Testing with Mockito and DI Frameworks
- Introduction
- Injecting test doubles instead of beans using Spring's code configuration
- Injecting test doubles instead of beans using Spring's XML configuration
- Injecting test doubles instead of beans using Springockito
- Injecting test doubles instead of beans with Guice
- Injecting test doubles instead of beans with Guice using Jukito
- Chapter 10. Mocking Libraries Comparison
- Introduction
- Mockito versus EasyMock
- Mockito versus JMockit
- Mockito versus JMock
- Mockito versus Spock
- Index 更新時間:2021-07-16 11:35:15
推薦閱讀
- 公有云容器化指南:騰訊云TKE實戰與應用
- Access 2016數據庫教程(微課版·第2版)
- Creating Mobile Apps with Sencha Touch 2
- Learning Spring Boot
- 醫療大數據挖掘與可視化
- 城市計算
- 大數據架構和算法實現之路:電商系統的技術實戰
- R語言數據挖掘
- Hadoop集群與安全
- Mastering LOB Development for Silverlight 5:A Case Study in Action
- 大數據數學基礎(R語言描述)
- 成功之路:ORACLE 11g學習筆記
- SQL Server 2012 數據庫教程(第3版)
- Scratch Cookbook
- AutoCAD基礎與應用精品教程(2008版)
- 機器視覺原理與案例詳解
- Visual Studio 2010(C#)Web數據庫項目開發
- Data Analysis with Python
- Kubernetes云原生數據管理
- SQL語法與范例詳解詞典
- 社交網站的數據挖掘與分析
- Android Studio 3.6 Development Essentials(Kotlin Edition)
- IPFS原理與實踐
- 大數據技術和應用
- Oracle數據庫管理與維護實戰
- Power BI數據分析與數據可視化(微課版)
- Reporting with Microsoft SQL Server 2012
- 檢索匹配:深度學習在搜索、廣告、推薦系統中的應用
- iPhone with Microsoft Exchange Server 2010:Business Integration and Deployment
- Access 2010數據庫技術及應用實訓教程