Coverart for item
The Resource Mockito cookbook : over 65 recipes to get you up and running with unit testing using Mockito, Marcin Grzejszczak

Mockito cookbook : over 65 recipes to get you up and running with unit testing using Mockito, Marcin Grzejszczak

Label
Mockito cookbook : over 65 recipes to get you up and running with unit testing using Mockito
Title
Mockito cookbook
Title remainder
over 65 recipes to get you up and running with unit testing using Mockito
Statement of responsibility
Marcin Grzejszczak
Creator
Subject
Genre
Language
eng
Summary
This is a focused guide with lots of practical recipes with presentations of business issues and presentation of the whole test of the system. This book shows the use of Mockito's popular unit testing frameworks such as JUnit, PowerMock, TestNG, and so on. If you are a software developer with no testing experience (especially with Mockito) and you want to start using Mockito in the most efficient way then this book is for you. This book assumes that you have a good knowledge level and understanding of Java-based unit testing frameworks
Member of
Cataloging source
UMI
http://library.link/vocab/creatorName
Grzejszczak, Marcin
Dewey number
006
Illustrations
illustrations
Index
index present
LC call number
QA76.76.T48
LC item number
G79 2013
Literary form
non fiction
Nature of contents
dictionaries
http://library.link/vocab/subjectName
  • Computer software
  • Application software
  • Java (Computer program language)
  • Open source software
  • COMPUTERS
  • Application software
  • Computer software
  • Java (Computer program language)
  • Open source software
Label
Mockito cookbook : over 65 recipes to get you up and running with unit testing using Mockito, Marcin Grzejszczak
Instantiates
Publication
Note
  • "Quick answers to common problems."
  • Includes index
Antecedent source
unknown
Carrier category
online resource
Carrier category code
  • cr
Carrier MARC source
rdacarrier
Color
multicolored
Content category
text
Content type code
  • txt
Content type MARC source
rdacontent
Contents
  • Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; 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 answerCreating 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 stubbingStubbing 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 valuesStubbing 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 happeningVerifying the order of interactions; Verifying interactions and ignoring stubbed methods; Verifying the method invocation within 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
Control code
883661847
Dimensions
unknown
Extent
1 online resource (1 volume)
File format
unknown
Form of item
online
Isbn
9781783982745
Level of compression
unknown
Media category
computer
Media MARC source
rdamedia
Media type code
  • c
Other physical details
illustrations
Quality assurance targets
not applicable
Reformatting quality
unknown
Sound
unknown sound
Specific material designation
remote
System control number
(OCoLC)883661847
Label
Mockito cookbook : over 65 recipes to get you up and running with unit testing using Mockito, Marcin Grzejszczak
Publication
Note
  • "Quick answers to common problems."
  • Includes index
Antecedent source
unknown
Carrier category
online resource
Carrier category code
  • cr
Carrier MARC source
rdacarrier
Color
multicolored
Content category
text
Content type code
  • txt
Content type MARC source
rdacontent
Contents
  • Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; 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 answerCreating 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 stubbingStubbing 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 valuesStubbing 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 happeningVerifying the order of interactions; Verifying interactions and ignoring stubbed methods; Verifying the method invocation within 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
Control code
883661847
Dimensions
unknown
Extent
1 online resource (1 volume)
File format
unknown
Form of item
online
Isbn
9781783982745
Level of compression
unknown
Media category
computer
Media MARC source
rdamedia
Media type code
  • c
Other physical details
illustrations
Quality assurance targets
not applicable
Reformatting quality
unknown
Sound
unknown sound
Specific material designation
remote
System control number
(OCoLC)883661847

Library Locations

    • Ellis LibraryBorrow it
      1020 Lowry Street, Columbia, MO, 65201, US
      38.944491 -92.326012
    • Engineering Library & Technology CommonsBorrow it
      W2001 Lafferre Hall, Columbia, MO, 65211, US
      38.946102 -92.330125
Processing Feedback ...