Mockito cookbook :: over 65 recipes to get you up and running with unit testing using Mockito /
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 n...
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Elektronisch E-Book |
Sprache: | English |
Veröffentlicht: |
Birmingham, UK :
Packt Pub.,
2014.
|
Schlagworte: | |
Online-Zugang: | Volltext |
Zusammenfassung: | 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. |
Beschreibung: | "Quick answers to common problems." Includes index. |
Beschreibung: | 1 online resource (1 volume) : illustrations |
ISBN: | 9781783982752 1783982756 1783982748 9781783982745 |
Internformat
MARC
LEADER | 00000cam a2200000 a 4500 | ||
---|---|---|---|
001 | ZDB-4-EBA-ocn883661847 | ||
003 | OCoLC | ||
005 | 20241004212047.0 | ||
006 | m o d | ||
007 | cr cnu---unuuu | ||
008 | 140715s2014 enka o 001 0 eng d | ||
040 | |a UMI |b eng |e pn |c UMI |d E7B |d N$T |d DEBBG |d DEBSZ |d COO |d YDXCP |d OCLCQ |d OCLCF |d OCLCQ |d K6U |d AGLDB |d OCLCQ |d COCUF |d ICA |d CNNOR |d OCLCQ |d CCO |d PIFFA |d FVL |d U3W |d REB |d D6H |d STF |d OCLCQ |d VTS |d CEF |d NLE |d INT |d VT2 |d OCLCQ |d WYU |d G3B |d TKN |d OCLCQ |d AU@ |d M8D |d UKAHL |d HS0 |d OCLCO |d QGK |d OCLCQ |d OCLCO |d OCLCL | ||
019 | |a 907252266 |a 1259057131 | ||
020 | |a 9781783982752 |q (electronic bk.) | ||
020 | |a 1783982756 |q (electronic bk.) | ||
020 | |a 1783982748 | ||
020 | |a 9781783982745 | ||
020 | |z 9781783982745 | ||
035 | |a (OCoLC)883661847 |z (OCoLC)907252266 |z (OCoLC)1259057131 | ||
050 | 4 | |a QA76.76.T48 |b G79 2013 | |
072 | 7 | |a COM |x 000000 |2 bisacsh | |
082 | 7 | |a 006 |2 23 | |
049 | |a MAIN | ||
100 | 1 | |a Grzejszczak, Marcin. | |
245 | 1 | 0 | |a Mockito cookbook : |b over 65 recipes to get you up and running with unit testing using Mockito / |c Marcin Grzejszczak. |
260 | |a Birmingham, UK : |b Packt Pub., |c 2014. | ||
300 | |a 1 online resource (1 volume) : |b illustrations | ||
336 | |a text |b txt |2 rdacontent | ||
337 | |a computer |b c |2 rdamedia | ||
338 | |a online resource |b cr |2 rdacarrier | ||
347 | |a text file | ||
588 | 0 | |a Online resource; title from cover (Safari, viewed July 9, 2014). | |
500 | |a "Quick answers to common problems." | ||
500 | |a Includes index. | ||
588 | 0 | |a Print version record. | |
505 | 0 | |a 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 | |
505 | 8 | |a 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 | |
505 | 8 | |a 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 | |
505 | 8 | |a 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 | |
505 | 8 | |a 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 | |
520 | |a 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. | ||
546 | |a English. | ||
650 | 0 | |a Computer software |x Testing. | |
650 | 0 | |a Application software |x Testing. | |
650 | 0 | |a Java (Computer program language) |0 http://id.loc.gov/authorities/subjects/sh95008574 | |
650 | 0 | |a Open source software. |0 http://id.loc.gov/authorities/subjects/sh99003437 | |
650 | 6 | |a Java (Langage de programmation) | |
650 | 6 | |a Logiciels libres. | |
650 | 7 | |a COMPUTERS |x General. |2 bisacsh | |
650 | 7 | |a Application software |x Testing |2 fast | |
650 | 7 | |a Computer software |x Testing |2 fast | |
650 | 7 | |a Java (Computer program language) |2 fast | |
650 | 7 | |a Open source software |2 fast | |
758 | |i has work: |a Mockito cookbook (Text) |1 https://id.oclc.org/worldcat/entity/E39PD3y7JMp4FhqGV99D3pDh3P |4 https://id.oclc.org/worldcat/ontology/hasWork | ||
776 | 0 | 8 | |i Print version: |a Grzejszczak, Marcin. |t Mockito cookbook : over 65 recipes to get you up and running with unit testing using Mockito. |d Birmingham, [England] : Packt Publishing, ©2014 |h iii, 268 pages |z 9781783982745 |
856 | 4 | 0 | |l FWS01 |p ZDB-4-EBA |q FWS_PDA_EBA |u https://search.ebscohost.com/login.aspx?direct=true&scope=site&db=nlebk&AN=805412 |3 Volltext |
938 | |a Askews and Holts Library Services |b ASKH |n AH26843921 | ||
938 | |a ebrary |b EBRY |n ebr10887665 | ||
938 | |a EBSCOhost |b EBSC |n 805412 | ||
938 | |a YBP Library Services |b YANK |n 11951093 | ||
994 | |a 92 |b GEBAY | ||
912 | |a ZDB-4-EBA | ||
049 | |a DE-863 |
Datensatz im Suchindex
DE-BY-FWS_katkey | ZDB-4-EBA-ocn883661847 |
---|---|
_version_ | 1816882278706446336 |
adam_text | |
any_adam_object | |
author | Grzejszczak, Marcin |
author_facet | Grzejszczak, Marcin |
author_role | |
author_sort | Grzejszczak, Marcin |
author_variant | m g mg |
building | Verbundindex |
bvnumber | localFWS |
callnumber-first | Q - Science |
callnumber-label | QA76 |
callnumber-raw | QA76.76.T48 G79 2013 |
callnumber-search | QA76.76.T48 G79 2013 |
callnumber-sort | QA 276.76 T48 G79 42013 |
callnumber-subject | QA - Mathematics |
collection | ZDB-4-EBA |
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 |
ctrlnum | (OCoLC)883661847 |
dewey-full | 006 |
dewey-hundreds | 000 - Computer science, information, general works |
dewey-ones | 006 - Special computer methods |
dewey-raw | 006 |
dewey-search | 006 |
dewey-sort | 16 |
dewey-tens | 000 - Computer science, information, general works |
discipline | Informatik |
format | Electronic eBook |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>06426cam a2200697 a 4500</leader><controlfield tag="001">ZDB-4-EBA-ocn883661847</controlfield><controlfield tag="003">OCoLC</controlfield><controlfield tag="005">20241004212047.0</controlfield><controlfield tag="006">m o d </controlfield><controlfield tag="007">cr cnu---unuuu</controlfield><controlfield tag="008">140715s2014 enka o 001 0 eng d</controlfield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">UMI</subfield><subfield code="b">eng</subfield><subfield code="e">pn</subfield><subfield code="c">UMI</subfield><subfield code="d">E7B</subfield><subfield code="d">N$T</subfield><subfield code="d">DEBBG</subfield><subfield code="d">DEBSZ</subfield><subfield code="d">COO</subfield><subfield code="d">YDXCP</subfield><subfield code="d">OCLCQ</subfield><subfield code="d">OCLCF</subfield><subfield code="d">OCLCQ</subfield><subfield code="d">K6U</subfield><subfield code="d">AGLDB</subfield><subfield code="d">OCLCQ</subfield><subfield code="d">COCUF</subfield><subfield code="d">ICA</subfield><subfield code="d">CNNOR</subfield><subfield code="d">OCLCQ</subfield><subfield code="d">CCO</subfield><subfield code="d">PIFFA</subfield><subfield code="d">FVL</subfield><subfield code="d">U3W</subfield><subfield code="d">REB</subfield><subfield code="d">D6H</subfield><subfield code="d">STF</subfield><subfield code="d">OCLCQ</subfield><subfield code="d">VTS</subfield><subfield code="d">CEF</subfield><subfield code="d">NLE</subfield><subfield code="d">INT</subfield><subfield code="d">VT2</subfield><subfield code="d">OCLCQ</subfield><subfield code="d">WYU</subfield><subfield code="d">G3B</subfield><subfield code="d">TKN</subfield><subfield code="d">OCLCQ</subfield><subfield code="d">AU@</subfield><subfield code="d">M8D</subfield><subfield code="d">UKAHL</subfield><subfield code="d">HS0</subfield><subfield code="d">OCLCO</subfield><subfield code="d">QGK</subfield><subfield code="d">OCLCQ</subfield><subfield code="d">OCLCO</subfield><subfield code="d">OCLCL</subfield></datafield><datafield tag="019" ind1=" " ind2=" "><subfield code="a">907252266</subfield><subfield code="a">1259057131</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9781783982752</subfield><subfield code="q">(electronic bk.)</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">1783982756</subfield><subfield code="q">(electronic bk.)</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">1783982748</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9781783982745</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="z">9781783982745</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)883661847</subfield><subfield code="z">(OCoLC)907252266</subfield><subfield code="z">(OCoLC)1259057131</subfield></datafield><datafield tag="050" ind1=" " ind2="4"><subfield code="a">QA76.76.T48</subfield><subfield code="b">G79 2013</subfield></datafield><datafield tag="072" ind1=" " ind2="7"><subfield code="a">COM</subfield><subfield code="x">000000</subfield><subfield code="2">bisacsh</subfield></datafield><datafield tag="082" ind1="7" ind2=" "><subfield code="a">006</subfield><subfield code="2">23</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">MAIN</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Grzejszczak, Marcin.</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Mockito cookbook :</subfield><subfield code="b">over 65 recipes to get you up and running with unit testing using Mockito /</subfield><subfield code="c">Marcin Grzejszczak.</subfield></datafield><datafield tag="260" ind1=" " ind2=" "><subfield code="a">Birmingham, UK :</subfield><subfield code="b">Packt Pub.,</subfield><subfield code="c">2014.</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">1 online resource (1 volume) :</subfield><subfield code="b">illustrations</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="a">text</subfield><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="a">computer</subfield><subfield code="b">c</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="a">online resource</subfield><subfield code="b">cr</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="347" ind1=" " ind2=" "><subfield code="a">text file</subfield></datafield><datafield tag="588" ind1="0" ind2=" "><subfield code="a">Online resource; title from cover (Safari, viewed July 9, 2014).</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">"Quick answers to common problems."</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">Includes index.</subfield></datafield><datafield tag="588" ind1="0" ind2=" "><subfield code="a">Print version record.</subfield></datafield><datafield tag="505" ind1="0" ind2=" "><subfield code="a">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</subfield></datafield><datafield tag="505" ind1="8" ind2=" "><subfield code="a">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</subfield></datafield><datafield tag="505" ind1="8" ind2=" "><subfield code="a">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</subfield></datafield><datafield tag="505" ind1="8" ind2=" "><subfield code="a">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</subfield></datafield><datafield tag="505" ind1="8" ind2=" "><subfield code="a">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</subfield></datafield><datafield tag="520" ind1=" " ind2=" "><subfield code="a">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.</subfield></datafield><datafield tag="546" ind1=" " ind2=" "><subfield code="a">English.</subfield></datafield><datafield tag="650" ind1=" " ind2="0"><subfield code="a">Computer software</subfield><subfield code="x">Testing.</subfield></datafield><datafield tag="650" ind1=" " ind2="0"><subfield code="a">Application software</subfield><subfield code="x">Testing.</subfield></datafield><datafield tag="650" ind1=" " ind2="0"><subfield code="a">Java (Computer program language)</subfield><subfield code="0">http://id.loc.gov/authorities/subjects/sh95008574</subfield></datafield><datafield tag="650" ind1=" " ind2="0"><subfield code="a">Open source software.</subfield><subfield code="0">http://id.loc.gov/authorities/subjects/sh99003437</subfield></datafield><datafield tag="650" ind1=" " ind2="6"><subfield code="a">Java (Langage de programmation)</subfield></datafield><datafield tag="650" ind1=" " ind2="6"><subfield code="a">Logiciels libres.</subfield></datafield><datafield tag="650" ind1=" " ind2="7"><subfield code="a">COMPUTERS</subfield><subfield code="x">General.</subfield><subfield code="2">bisacsh</subfield></datafield><datafield tag="650" ind1=" " ind2="7"><subfield code="a">Application software</subfield><subfield code="x">Testing</subfield><subfield code="2">fast</subfield></datafield><datafield tag="650" ind1=" " ind2="7"><subfield code="a">Computer software</subfield><subfield code="x">Testing</subfield><subfield code="2">fast</subfield></datafield><datafield tag="650" ind1=" " ind2="7"><subfield code="a">Java (Computer program language)</subfield><subfield code="2">fast</subfield></datafield><datafield tag="650" ind1=" " ind2="7"><subfield code="a">Open source software</subfield><subfield code="2">fast</subfield></datafield><datafield tag="758" ind1=" " ind2=" "><subfield code="i">has work:</subfield><subfield code="a">Mockito cookbook (Text)</subfield><subfield code="1">https://id.oclc.org/worldcat/entity/E39PD3y7JMp4FhqGV99D3pDh3P</subfield><subfield code="4">https://id.oclc.org/worldcat/ontology/hasWork</subfield></datafield><datafield tag="776" ind1="0" ind2="8"><subfield code="i">Print version:</subfield><subfield code="a">Grzejszczak, Marcin.</subfield><subfield code="t">Mockito cookbook : over 65 recipes to get you up and running with unit testing using Mockito.</subfield><subfield code="d">Birmingham, [England] : Packt Publishing, ©2014</subfield><subfield code="h">iii, 268 pages</subfield><subfield code="z">9781783982745</subfield></datafield><datafield tag="856" ind1="4" ind2="0"><subfield code="l">FWS01</subfield><subfield code="p">ZDB-4-EBA</subfield><subfield code="q">FWS_PDA_EBA</subfield><subfield code="u">https://search.ebscohost.com/login.aspx?direct=true&scope=site&db=nlebk&AN=805412</subfield><subfield code="3">Volltext</subfield></datafield><datafield tag="938" ind1=" " ind2=" "><subfield code="a">Askews and Holts Library Services</subfield><subfield code="b">ASKH</subfield><subfield code="n">AH26843921</subfield></datafield><datafield tag="938" ind1=" " ind2=" "><subfield code="a">ebrary</subfield><subfield code="b">EBRY</subfield><subfield code="n">ebr10887665</subfield></datafield><datafield tag="938" ind1=" " ind2=" "><subfield code="a">EBSCOhost</subfield><subfield code="b">EBSC</subfield><subfield code="n">805412</subfield></datafield><datafield tag="938" ind1=" " ind2=" "><subfield code="a">YBP Library Services</subfield><subfield code="b">YANK</subfield><subfield code="n">11951093</subfield></datafield><datafield tag="994" ind1=" " ind2=" "><subfield code="a">92</subfield><subfield code="b">GEBAY</subfield></datafield><datafield tag="912" ind1=" " ind2=" "><subfield code="a">ZDB-4-EBA</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-863</subfield></datafield></record></collection> |
id | ZDB-4-EBA-ocn883661847 |
illustrated | Illustrated |
indexdate | 2024-11-27T13:26:05Z |
institution | BVB |
isbn | 9781783982752 1783982756 1783982748 9781783982745 |
language | English |
oclc_num | 883661847 |
open_access_boolean | |
owner | MAIN DE-863 DE-BY-FWS |
owner_facet | MAIN DE-863 DE-BY-FWS |
physical | 1 online resource (1 volume) : illustrations |
psigel | ZDB-4-EBA |
publishDate | 2014 |
publishDateSearch | 2014 |
publishDateSort | 2014 |
publisher | Packt Pub., |
record_format | marc |
spelling | Grzejszczak, Marcin. Mockito cookbook : over 65 recipes to get you up and running with unit testing using Mockito / Marcin Grzejszczak. Birmingham, UK : Packt Pub., 2014. 1 online resource (1 volume) : illustrations text txt rdacontent computer c rdamedia online resource cr rdacarrier text file Online resource; title from cover (Safari, viewed July 9, 2014). "Quick answers to common problems." Includes index. Print version record. 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 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. English. Computer software Testing. Application software Testing. Java (Computer program language) http://id.loc.gov/authorities/subjects/sh95008574 Open source software. http://id.loc.gov/authorities/subjects/sh99003437 Java (Langage de programmation) Logiciels libres. COMPUTERS General. bisacsh Application software Testing fast Computer software Testing fast Java (Computer program language) fast Open source software fast has work: Mockito cookbook (Text) https://id.oclc.org/worldcat/entity/E39PD3y7JMp4FhqGV99D3pDh3P https://id.oclc.org/worldcat/ontology/hasWork Print version: Grzejszczak, Marcin. Mockito cookbook : over 65 recipes to get you up and running with unit testing using Mockito. Birmingham, [England] : Packt Publishing, ©2014 iii, 268 pages 9781783982745 FWS01 ZDB-4-EBA FWS_PDA_EBA https://search.ebscohost.com/login.aspx?direct=true&scope=site&db=nlebk&AN=805412 Volltext |
spellingShingle | Grzejszczak, Marcin Mockito cookbook : over 65 recipes to get you up and running with unit testing using Mockito / 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 Computer software Testing. Application software Testing. Java (Computer program language) http://id.loc.gov/authorities/subjects/sh95008574 Open source software. http://id.loc.gov/authorities/subjects/sh99003437 Java (Langage de programmation) Logiciels libres. COMPUTERS General. bisacsh Application software Testing fast Computer software Testing fast Java (Computer program language) fast Open source software fast |
subject_GND | http://id.loc.gov/authorities/subjects/sh95008574 http://id.loc.gov/authorities/subjects/sh99003437 |
title | Mockito cookbook : over 65 recipes to get you up and running with unit testing using Mockito / |
title_auth | Mockito cookbook : over 65 recipes to get you up and running with unit testing using Mockito / |
title_exact_search | Mockito cookbook : over 65 recipes to get you up and running with unit testing using Mockito / |
title_full | Mockito cookbook : over 65 recipes to get you up and running with unit testing using Mockito / Marcin Grzejszczak. |
title_fullStr | Mockito cookbook : over 65 recipes to get you up and running with unit testing using Mockito / Marcin Grzejszczak. |
title_full_unstemmed | Mockito cookbook : over 65 recipes to get you up and running with unit testing using Mockito / Marcin Grzejszczak. |
title_short | Mockito cookbook : |
title_sort | mockito cookbook over 65 recipes to get you up and running with unit testing using mockito |
title_sub | over 65 recipes to get you up and running with unit testing using Mockito / |
topic | Computer software Testing. Application software Testing. Java (Computer program language) http://id.loc.gov/authorities/subjects/sh95008574 Open source software. http://id.loc.gov/authorities/subjects/sh99003437 Java (Langage de programmation) Logiciels libres. COMPUTERS General. bisacsh Application software Testing fast Computer software Testing fast Java (Computer program language) fast Open source software fast |
topic_facet | Computer software Testing. Application software Testing. Java (Computer program language) Open source software. Java (Langage de programmation) Logiciels libres. COMPUTERS General. Application software Testing Computer software Testing Open source software |
url | https://search.ebscohost.com/login.aspx?direct=true&scope=site&db=nlebk&AN=805412 |
work_keys_str_mv | AT grzejszczakmarcin mockitocookbookover65recipestogetyouupandrunningwithunittestingusingmockito |