Cover image for Instant Mock Testing with PowerMock.
Instant Mock Testing with PowerMock.
Title:
Instant Mock Testing with PowerMock.
Author:
Shah, Deep.
ISBN:
9781783289967
Personal Author:
Physical Description:
1 online resource (83 pages)
Contents:
Instant Mock Testing with PowerMock -- Instant Mock Testing with PowerMock -- Credits -- About the Author -- About the reviewer -- 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. Instant Mock Testing with PowerMock -- Saying Hello World! (Simple) -- How to do it... -- How it works... -- There's more... -- MockSettings -- Getting and installing PowerMock (Simple) -- Getting ready -- How to do it... -- There's more... -- Maven integration -- Other integration options -- Mocking static methods (Simple) -- Getting ready -- How to do it... -- How it works... -- There's more... -- .doNothing and .doThrow on instance methods -- Verifying method invocation (Simple) -- Getting ready -- How to do it... -- How it works... -- There's more... -- Other verification modes -- InOrder verification -- Mocking final classes or methods (Simple) -- Getting ready -- How to do it... -- How it works... -- Mocking constructors (Medium) -- Getting ready -- How to do it... -- How it works... -- There's more... -- Understanding argument matchers (Medium) -- Getting ready -- How to do it... -- How it works... -- There's more... -- Other built-in argument matchers -- Understanding the Answer interface (Advanced) -- Getting ready -- How to do it... -- How it works... -- There's more... -- PowerMockito.mock with default Answer -- Partial mocking with spies (Advanced) -- Getting ready -- How to do it... -- How it works... -- Mocking private methods (Medium) -- Getting ready -- How to do it... -- How it works... -- There's more... -- Alternate way of mocking private methods.

Breaking the encapsulation (Advanced) -- Getting ready -- How to do it... -- How it works... -- There's more... -- Suppressing unwanted behavior (Advanced) -- Getting ready -- How to do it... -- How it works... -- There's more... -- Suppressing constructors -- Suppressing fields.
Abstract:
Filled with practical, step-by-step instructions and clear explanations for the most important and useful tasks. A concise guide full of step-by-step recipes, to teach you how you can use PowerMock to unit test code.If you are a beginner who would like to learn how to use PowerMock, this is the perfect guide for you! As the book comprehensively covers both basic and advanced concepts, this guide is also suitable for those of you who have an intermediate knowledge of PowerMock.
Local Note:
Electronic reproduction. Ann Arbor, Michigan : ProQuest Ebook Central, 2017. Available via World Wide Web. Access may be limited to ProQuest Ebook Central affiliated libraries.
Electronic Access:
Click to View
Holds: Copies: