Amazon cover image
Image from Amazon.com

Mockito essentials : a practical guide to get you up and running with unit testing using Mockito / Sujoy Acharya.

By: Material type: TextTextSeries: Community experience distilledPublication details: Birmingham, UK : Packt Pub., 2014.Description: 1 online resource (1 volume) : illustrationsContent type:
  • text
Media type:
  • computer
Carrier type:
  • online resource
ISBN:
  • 9781783983612
  • 1783983612
Other title:
  • A practical guide to get you up and running with unit testing using Mockito
Subject(s): Genre/Form: Additional physical formats: Print version:: Mockito Essentials.DDC classification:
  • 005.437
LOC classification:
  • QA76.75 .A343 2014
Online resources:
Contents:
Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Exploring Test Doubles; Working with unit tests; Understanding test doubles; Using dummy objects; Working with stubs; Exploring a test spy; Getting started with mock objects; Implementing fake objects -- simulators; Summary; Chapter 2: Socializing with Mockito; Exploring Mockito; Exploring unit test qualities; Realizing the significance of Mockito; Working with Mockito; Adding a Mockito dependency; Stubbing method calls; Throwing exceptions; Using argument matchers.
Working with wildcard matchersWorking with a custom ArgumentMatcher class; Verifying method calls; Verifying zero and no-more interactions; Answering method calls; Understanding the Mockito architecture; Summary; Chapter 3: Accelerating Mockito; Learning advanced Mockito features; Working with void methods; Throwing exceptions from void methods; Working with void method callbacks; Learning doCallRealMethod and doNothing; Exploring doReturn; Verifying arguments using ArgumentCaptor; Working with generic collection arguments; Working with variable arguments and arrays.
Verifying an invocation orderSpying objects; Exploring Mockito annotations; Changing the default Mockito settings; Resetting mock objects; Working with inline stubbing; Determining mock details; Summary; Chapter 4: Behavior-driven Development with Mockito; Understanding the context of BDD; Exploring the top-down strategy; Exploring the bottom-up strategy; Finding the gaps; Exploring BDD; Exercising BDD with Mockito; The BDD syntax; Summary; Chapter 5: Unit Testing the Legacy Code with Mockito; Understanding the legacy code; Exploring testing impediments; Working with PowerMock.
Stubbing static methodsSuppressing static blocks; Suppressing a superclass constructor; Suppressing our own constructor; Suppressing methods; Stubbing private methods; Stubbing final methods; Mocking final classes; Designing for testability with Mockito; Identifying constructor issues; Realizing initialization issues; Working with private methods; Working with final methods; Exploring static method issues; Working with final classes; Learning new concerns; Exploring static variables and blocks; Summary; Chapter 6: Developing SOA with Mockito; Exploring Service-oriented Architecture (SOA).
Working with web servicesExploring JAX-WS with Eclipse; Developing a RESTful web service; Building a RESTful web service with Spring Framework; Summary; Chapter 7 : Unit Testing GWT Code with Mockito; Exploring Ajax and GWT; Learning the MVP pattern; Developing a GWT application using MVP; Unit testing GWT Code with Mockito; Summary; Index.
Summary: This book is ideal for developers who have some experience in Java application development as well as some basic knowledge of test doubles and JUnit testing. This book also introduces you to the fundamentals of JUnit testing, test doubles, refactoring legacy code, and writing JUnit tests for GWT and web services.
Item type:
Tags from this library: No tags from this library for this title. Log in to add tags.
Star ratings
    Average rating: 0.0 (0 votes)
Holdings
Item type Home library Collection Call number Materials specified Status Date due Barcode
Electronic-Books Electronic-Books OPJGU Sonepat- Campus E-Books EBSCO Available

Online resource; title from cover (Safari, viewed Nov. 7, 2014).

Online resource; title from PDF title page (EBSCO, viewed July 10, 2017).

Includes index.

Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Exploring Test Doubles; Working with unit tests; Understanding test doubles; Using dummy objects; Working with stubs; Exploring a test spy; Getting started with mock objects; Implementing fake objects -- simulators; Summary; Chapter 2: Socializing with Mockito; Exploring Mockito; Exploring unit test qualities; Realizing the significance of Mockito; Working with Mockito; Adding a Mockito dependency; Stubbing method calls; Throwing exceptions; Using argument matchers.

Working with wildcard matchersWorking with a custom ArgumentMatcher class; Verifying method calls; Verifying zero and no-more interactions; Answering method calls; Understanding the Mockito architecture; Summary; Chapter 3: Accelerating Mockito; Learning advanced Mockito features; Working with void methods; Throwing exceptions from void methods; Working with void method callbacks; Learning doCallRealMethod and doNothing; Exploring doReturn; Verifying arguments using ArgumentCaptor; Working with generic collection arguments; Working with variable arguments and arrays.

Verifying an invocation orderSpying objects; Exploring Mockito annotations; Changing the default Mockito settings; Resetting mock objects; Working with inline stubbing; Determining mock details; Summary; Chapter 4: Behavior-driven Development with Mockito; Understanding the context of BDD; Exploring the top-down strategy; Exploring the bottom-up strategy; Finding the gaps; Exploring BDD; Exercising BDD with Mockito; The BDD syntax; Summary; Chapter 5: Unit Testing the Legacy Code with Mockito; Understanding the legacy code; Exploring testing impediments; Working with PowerMock.

Stubbing static methodsSuppressing static blocks; Suppressing a superclass constructor; Suppressing our own constructor; Suppressing methods; Stubbing private methods; Stubbing final methods; Mocking final classes; Designing for testability with Mockito; Identifying constructor issues; Realizing initialization issues; Working with private methods; Working with final methods; Exploring static method issues; Working with final classes; Learning new concerns; Exploring static variables and blocks; Summary; Chapter 6: Developing SOA with Mockito; Exploring Service-oriented Architecture (SOA).

Working with web servicesExploring JAX-WS with Eclipse; Developing a RESTful web service; Building a RESTful web service with Spring Framework; Summary; Chapter 7 : Unit Testing GWT Code with Mockito; Exploring Ajax and GWT; Learning the MVP pattern; Developing a GWT application using MVP; Unit testing GWT Code with Mockito; Summary; Index.

This book is ideal for developers who have some experience in Java application development as well as some basic knowledge of test doubles and JUnit testing. This book also introduces you to the fundamentals of JUnit testing, test doubles, refactoring legacy code, and writing JUnit tests for GWT and web services.

eBooks on EBSCOhost EBSCO eBook Subscription Academic Collection - Worldwide

There are no comments on this title.

to post a comment.

O.P. Jindal Global University, Sonepat-Narela Road, Sonepat, Haryana (India) - 131001

Send your feedback to glus@jgu.edu.in

Hosted, Implemented & Customized by: BestBookBuddies   |   Maintained by: Global Library