SlideShare una empresa de Scribd logo
1 de 20
Descargar para leer sin conexión
Mock Object




2011   3   5
How it works

               SUT

               Mock Object   SUT




2011   3   5
When to use it

               Untested Requirement
                   (pp.273)




                                 ↑

2011   3   5
Mock Object
                          Test Stub


                                      equals


                                                   Mock Object


                 equals                        →Equality Pollution
               (pp.217)




2011   3   5
Mock Object                  Equality
               Assertions           comparator




               Mock Object




                     Mock Object   Mock Object


                              Mock Object



2011   3   5
Implementation Notes

               Mock Object        SUT




                      Test Spy



2011   3   5
Mock Object                       4
                      fixture
                      3
                          result verification phase
                  (“final verification”
                  )




2011   3   5
Fixture Setup
               MockObject         /


               Exercise SUT
               MocK Object


               Result verification
                        “final verification”


               Fixture teardown




2011   3   5
Construction
               Four-Phase Test   fixture setup phase
                        Mock Object




               Configuration with Expected Values
               Test Double                     Mock
               Object


               →Hard-Coded Test Double


2011   3   5
Installation
               Test Double SUT




               SUT


               Dependency Injection   Dependency Lookup




2011   3   5
Usage
               SUT Mock Object




               Assertion
               (      Mock Object


                                    )


2011   3   5
Mock Object   SUT


                             →happy path




2011   3   5
Final Verification
                          1


                         Mock Object toolkits    teardown


                                       final Verification
               Method




2011   3   5
Motivating Example




2011   3   5
Refactoring Notes
                       Test Double

               Mock Object
                                 SUT



                             Mock Object                 1
                                     final verification method




2011   3   5
2011   3   5
2011   3   5
JUnit3      Mock Object    TestCase
                                    Assertion Method   static




                   xUnit Family      NUnit   static
                         Assert


                  Ruby Test::Unit        mixins
               Assert



2011   3   5
Example: Mock Object
               (Dynamically Generated)




2011   3   5
Further Reading

                  xUnit                Mock Object


                                        Mock Object
               Test Stub Fake Object


                →Appnendix B(pp.741)



2011   3   5

Más contenido relacionado

La actualidad más candente

Unit testing.pptx [repaired]
Unit testing.pptx [repaired]Unit testing.pptx [repaired]
Unit testing.pptx [repaired]Mohammad Asmar
 
What's new in c# 6.0
What's new in c# 6.0What's new in c# 6.0
What's new in c# 6.0LearningTech
 
2. Design patterns. part #2
2. Design patterns. part #22. Design patterns. part #2
2. Design patterns. part #2Leonid Maslov
 
The Use of Static Code Analysis When Teaching or Developing Open-Source Software
The Use of Static Code Analysis When Teaching or Developing Open-Source SoftwareThe Use of Static Code Analysis When Teaching or Developing Open-Source Software
The Use of Static Code Analysis When Teaching or Developing Open-Source SoftwareAndrey Karpov
 
Templates exception handling
Templates exception handlingTemplates exception handling
Templates exception handlingsanya6900
 
A Proposal to Orchestrate Test Cases
A Proposal to Orchestrate Test CasesA Proposal to Orchestrate Test Cases
A Proposal to Orchestrate Test CasesBoni García
 
Test final jav_aaa
Test final jav_aaaTest final jav_aaa
Test final jav_aaaBagusBudi11
 
Xp Day 080506 Unit Tests And Mocks
Xp Day 080506 Unit Tests And MocksXp Day 080506 Unit Tests And Mocks
Xp Day 080506 Unit Tests And Mocksguillaumecarre
 
Mining Fix Patterns for FindBugs Violations
Mining Fix Patterns for FindBugs ViolationsMining Fix Patterns for FindBugs Violations
Mining Fix Patterns for FindBugs ViolationsDongsun Kim
 
Covariance, contravariance 觀念分享
Covariance, contravariance 觀念分享Covariance, contravariance 觀念分享
Covariance, contravariance 觀念分享LearningTech
 
Java 8 Functional Programming - I
Java 8 Functional Programming - IJava 8 Functional Programming - I
Java 8 Functional Programming - IUgur Yeter
 
TMPA-2015: The Application of Parameterized Hierarchy Templates for Automated...
TMPA-2015: The Application of Parameterized Hierarchy Templates for Automated...TMPA-2015: The Application of Parameterized Hierarchy Templates for Automated...
TMPA-2015: The Application of Parameterized Hierarchy Templates for Automated...Iosif Itkin
 
Beyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software ArchitectureBeyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software ArchitectureJayaram Sankaranarayanan
 
Software Engineering - Module 3: Lesson7
Software Engineering - Module 3: Lesson7Software Engineering - Module 3: Lesson7
Software Engineering - Module 3: Lesson7ArraLafuente
 
QTP Automation Testing Tutorial 5
QTP Automation Testing Tutorial 5QTP Automation Testing Tutorial 5
QTP Automation Testing Tutorial 5Akash Tyagi
 
White Box Testing (Introduction to)
White Box Testing (Introduction to)White Box Testing (Introduction to)
White Box Testing (Introduction to)Henry Muccini
 
Functional Programming 101 for Java 7 Developers
Functional Programming 101 for Java 7 DevelopersFunctional Programming 101 for Java 7 Developers
Functional Programming 101 for Java 7 DevelopersJayaram Sankaranarayanan
 

La actualidad más candente (20)

Unit testing.pptx [repaired]
Unit testing.pptx [repaired]Unit testing.pptx [repaired]
Unit testing.pptx [repaired]
 
What's new in c# 6.0
What's new in c# 6.0What's new in c# 6.0
What's new in c# 6.0
 
2. Design patterns. part #2
2. Design patterns. part #22. Design patterns. part #2
2. Design patterns. part #2
 
The Use of Static Code Analysis When Teaching or Developing Open-Source Software
The Use of Static Code Analysis When Teaching or Developing Open-Source SoftwareThe Use of Static Code Analysis When Teaching or Developing Open-Source Software
The Use of Static Code Analysis When Teaching or Developing Open-Source Software
 
Templates exception handling
Templates exception handlingTemplates exception handling
Templates exception handling
 
A Proposal to Orchestrate Test Cases
A Proposal to Orchestrate Test CasesA Proposal to Orchestrate Test Cases
A Proposal to Orchestrate Test Cases
 
Grasping dataset
Grasping datasetGrasping dataset
Grasping dataset
 
Core java day4
Core java day4Core java day4
Core java day4
 
Test final jav_aaa
Test final jav_aaaTest final jav_aaa
Test final jav_aaa
 
Xp Day 080506 Unit Tests And Mocks
Xp Day 080506 Unit Tests And MocksXp Day 080506 Unit Tests And Mocks
Xp Day 080506 Unit Tests And Mocks
 
Mining Fix Patterns for FindBugs Violations
Mining Fix Patterns for FindBugs ViolationsMining Fix Patterns for FindBugs Violations
Mining Fix Patterns for FindBugs Violations
 
Covariance, contravariance 觀念分享
Covariance, contravariance 觀念分享Covariance, contravariance 觀念分享
Covariance, contravariance 觀念分享
 
Java 8 Functional Programming - I
Java 8 Functional Programming - IJava 8 Functional Programming - I
Java 8 Functional Programming - I
 
TMPA-2015: The Application of Parameterized Hierarchy Templates for Automated...
TMPA-2015: The Application of Parameterized Hierarchy Templates for Automated...TMPA-2015: The Application of Parameterized Hierarchy Templates for Automated...
TMPA-2015: The Application of Parameterized Hierarchy Templates for Automated...
 
Beyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software ArchitectureBeyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software Architecture
 
Software Engineering - Module 3: Lesson7
Software Engineering - Module 3: Lesson7Software Engineering - Module 3: Lesson7
Software Engineering - Module 3: Lesson7
 
QTP Automation Testing Tutorial 5
QTP Automation Testing Tutorial 5QTP Automation Testing Tutorial 5
QTP Automation Testing Tutorial 5
 
Md04 flow control
Md04 flow controlMd04 flow control
Md04 flow control
 
White Box Testing (Introduction to)
White Box Testing (Introduction to)White Box Testing (Introduction to)
White Box Testing (Introduction to)
 
Functional Programming 101 for Java 7 Developers
Functional Programming 101 for Java 7 DevelopersFunctional Programming 101 for Java 7 Developers
Functional Programming 101 for Java 7 Developers
 

Destacado

Mock Objects Presentation
Mock Objects PresentationMock Objects Presentation
Mock Objects PresentationAndriy Buday
 
Mock objects - Teste de código com dependências
Mock objects - Teste de código com dependênciasMock objects - Teste de código com dependências
Mock objects - Teste de código com dependênciasDenis L Presciliano
 
Testing with Mock Objects
Testing with Mock ObjectsTesting with Mock Objects
Testing with Mock ObjectsBen Carey
 
TDD and mock objects
TDD and mock objectsTDD and mock objects
TDD and mock objectsSteve Zhang
 
Easymock Tutorial
Easymock TutorialEasymock Tutorial
Easymock TutorialSbin m
 
Advanced PHPUnit Testing
Advanced PHPUnit TestingAdvanced PHPUnit Testing
Advanced PHPUnit TestingMike Lively
 

Destacado (8)

Mock Objects Presentation
Mock Objects PresentationMock Objects Presentation
Mock Objects Presentation
 
Beyond TDD
Beyond TDDBeyond TDD
Beyond TDD
 
Mock objects - Teste de código com dependências
Mock objects - Teste de código com dependênciasMock objects - Teste de código com dependências
Mock objects - Teste de código com dependências
 
Testing with Mock Objects
Testing with Mock ObjectsTesting with Mock Objects
Testing with Mock Objects
 
TDD and mock objects
TDD and mock objectsTDD and mock objects
TDD and mock objects
 
Easymock Tutorial
Easymock TutorialEasymock Tutorial
Easymock Tutorial
 
Mock objects in PHPUnit
Mock objects in PHPUnitMock objects in PHPUnit
Mock objects in PHPUnit
 
Advanced PHPUnit Testing
Advanced PHPUnit TestingAdvanced PHPUnit Testing
Advanced PHPUnit Testing
 

Más de Hiroyuki Ohnaka

remote Docker over SSHが熱い
remote Docker over SSHが熱いremote Docker over SSHが熱い
remote Docker over SSHが熱いHiroyuki Ohnaka
 
VSCode Remote Container & GitHub Codespacesで拓く次世代のJava開発体験
VSCode Remote Container & GitHub Codespacesで拓く次世代のJava開発体験VSCode Remote Container & GitHub Codespacesで拓く次世代のJava開発体験
VSCode Remote Container & GitHub Codespacesで拓く次世代のJava開発体験Hiroyuki Ohnaka
 
Remote Development with Visual Studio Code & A clean dev env, working every ...
Remote Development with Visual Studio Code &  A clean dev env, working every ...Remote Development with Visual Studio Code &  A clean dev env, working every ...
Remote Development with Visual Studio Code & A clean dev env, working every ...Hiroyuki Ohnaka
 
ChefとItamaeをニコイチしてAnsibleにマイグレーションした話
ChefとItamaeをニコイチしてAnsibleにマイグレーションした話ChefとItamaeをニコイチしてAnsibleにマイグレーションした話
ChefとItamaeをニコイチしてAnsibleにマイグレーションした話Hiroyuki Ohnaka
 
「WindowsデスクトップでWeb開発 改訂版」サンプル
「WindowsデスクトップでWeb開発 改訂版」サンプル「WindowsデスクトップでWeb開発 改訂版」サンプル
「WindowsデスクトップでWeb開発 改訂版」サンプルHiroyuki Ohnaka
 
Microsoft DocsにContributeした話
Microsoft DocsにContributeした話Microsoft DocsにContributeした話
Microsoft DocsにContributeした話Hiroyuki Ohnaka
 
Azure functions+typescript
Azure functions+typescriptAzure functions+typescript
Azure functions+typescriptHiroyuki Ohnaka
 
技術書典4 く-35「錬金術MeetUp」 Alchemist Vol.1 サンプル版
 技術書典4  く-35「錬金術MeetUp」 Alchemist Vol.1 サンプル版 技術書典4  く-35「錬金術MeetUp」 Alchemist Vol.1 サンプル版
技術書典4 く-35「錬金術MeetUp」 Alchemist Vol.1 サンプル版Hiroyuki Ohnaka
 
4/22 技術書典4 か-16「ふぃーるどのーつ」 新刊「すいーとみゅーじっく vol.5Mackerelではじめるお手軽サーバー監視」サンプル版
4/22 技術書典4 か-16「ふぃーるどのーつ」 新刊「すいーとみゅーじっく vol.5Mackerelではじめるお手軽サーバー監視」サンプル版4/22 技術書典4 か-16「ふぃーるどのーつ」 新刊「すいーとみゅーじっく vol.5Mackerelではじめるお手軽サーバー監視」サンプル版
4/22 技術書典4 か-16「ふぃーるどのーつ」 新刊「すいーとみゅーじっく vol.5Mackerelではじめるお手軽サーバー監視」サンプル版Hiroyuki Ohnaka
 
仮想通貨始めました~GethではじめるEthereum~
仮想通貨始めました~GethではじめるEthereum~仮想通貨始めました~GethではじめるEthereum~
仮想通貨始めました~GethではじめるEthereum~Hiroyuki Ohnaka
 
錬金術MeetUpへのお誘い
錬金術MeetUpへのお誘い錬金術MeetUpへのお誘い
錬金術MeetUpへのお誘いHiroyuki Ohnaka
 
Mackerelではじめる お手軽サーバー監視
Mackerelではじめる お手軽サーバー監視Mackerelではじめる お手軽サーバー監視
Mackerelではじめる お手軽サーバー監視Hiroyuki Ohnaka
 
「GebとSpockではじめるシステムテスト自動化」
「GebとSpockではじめるシステムテスト自動化」「GebとSpockではじめるシステムテスト自動化」
「GebとSpockではじめるシステムテスト自動化」Hiroyuki Ohnaka
 
TDDはじめて物語Second Season(updated)
TDDはじめて物語Second Season(updated)TDDはじめて物語Second Season(updated)
TDDはじめて物語Second Season(updated)Hiroyuki Ohnaka
 
TDDはじめて物語 Second Season #tddbc
TDDはじめて物語 Second Season #tddbcTDDはじめて物語 Second Season #tddbc
TDDはじめて物語 Second Season #tddbcHiroyuki Ohnaka
 
XP祭り2017 LT 「DevOps再考」(改題)
XP祭り2017 LT 「DevOps再考」(改題)XP祭り2017 LT 「DevOps再考」(改題)
XP祭り2017 LT 「DevOps再考」(改題)Hiroyuki Ohnaka
 
JDK9の真の目玉機能はこれだ!
JDK9の真の目玉機能はこれだ!JDK9の真の目玉機能はこれだ!
JDK9の真の目玉機能はこれだ!Hiroyuki Ohnaka
 
Java8移行は怖くない~エンタープライズ案件でのJava8移行事例~
Java8移行は怖くない~エンタープライズ案件でのJava8移行事例~Java8移行は怖くない~エンタープライズ案件でのJava8移行事例~
Java8移行は怖くない~エンタープライズ案件でのJava8移行事例~Hiroyuki Ohnaka
 
「すいーとみゅーじっく」のできるまで
「すいーとみゅーじっく」のできるまで「すいーとみゅーじっく」のできるまで
「すいーとみゅーじっく」のできるまでHiroyuki Ohnaka
 

Más de Hiroyuki Ohnaka (20)

remote Docker over SSHが熱い
remote Docker over SSHが熱いremote Docker over SSHが熱い
remote Docker over SSHが熱い
 
VSCode Remote Container & GitHub Codespacesで拓く次世代のJava開発体験
VSCode Remote Container & GitHub Codespacesで拓く次世代のJava開発体験VSCode Remote Container & GitHub Codespacesで拓く次世代のJava開発体験
VSCode Remote Container & GitHub Codespacesで拓く次世代のJava開発体験
 
Remote Development with Visual Studio Code & A clean dev env, working every ...
Remote Development with Visual Studio Code &  A clean dev env, working every ...Remote Development with Visual Studio Code &  A clean dev env, working every ...
Remote Development with Visual Studio Code & A clean dev env, working every ...
 
ChefとItamaeをニコイチしてAnsibleにマイグレーションした話
ChefとItamaeをニコイチしてAnsibleにマイグレーションした話ChefとItamaeをニコイチしてAnsibleにマイグレーションした話
ChefとItamaeをニコイチしてAnsibleにマイグレーションした話
 
「WindowsデスクトップでWeb開発 改訂版」サンプル
「WindowsデスクトップでWeb開発 改訂版」サンプル「WindowsデスクトップでWeb開発 改訂版」サンプル
「WindowsデスクトップでWeb開発 改訂版」サンプル
 
Mackerelの薄い本
Mackerelの薄い本Mackerelの薄い本
Mackerelの薄い本
 
Microsoft DocsにContributeした話
Microsoft DocsにContributeした話Microsoft DocsにContributeした話
Microsoft DocsにContributeした話
 
Azure functions+typescript
Azure functions+typescriptAzure functions+typescript
Azure functions+typescript
 
技術書典4 く-35「錬金術MeetUp」 Alchemist Vol.1 サンプル版
 技術書典4  く-35「錬金術MeetUp」 Alchemist Vol.1 サンプル版 技術書典4  く-35「錬金術MeetUp」 Alchemist Vol.1 サンプル版
技術書典4 く-35「錬金術MeetUp」 Alchemist Vol.1 サンプル版
 
4/22 技術書典4 か-16「ふぃーるどのーつ」 新刊「すいーとみゅーじっく vol.5Mackerelではじめるお手軽サーバー監視」サンプル版
4/22 技術書典4 か-16「ふぃーるどのーつ」 新刊「すいーとみゅーじっく vol.5Mackerelではじめるお手軽サーバー監視」サンプル版4/22 技術書典4 か-16「ふぃーるどのーつ」 新刊「すいーとみゅーじっく vol.5Mackerelではじめるお手軽サーバー監視」サンプル版
4/22 技術書典4 か-16「ふぃーるどのーつ」 新刊「すいーとみゅーじっく vol.5Mackerelではじめるお手軽サーバー監視」サンプル版
 
仮想通貨始めました~GethではじめるEthereum~
仮想通貨始めました~GethではじめるEthereum~仮想通貨始めました~GethではじめるEthereum~
仮想通貨始めました~GethではじめるEthereum~
 
錬金術MeetUpへのお誘い
錬金術MeetUpへのお誘い錬金術MeetUpへのお誘い
錬金術MeetUpへのお誘い
 
Mackerelではじめる お手軽サーバー監視
Mackerelではじめる お手軽サーバー監視Mackerelではじめる お手軽サーバー監視
Mackerelではじめる お手軽サーバー監視
 
「GebとSpockではじめるシステムテスト自動化」
「GebとSpockではじめるシステムテスト自動化」「GebとSpockではじめるシステムテスト自動化」
「GebとSpockではじめるシステムテスト自動化」
 
TDDはじめて物語Second Season(updated)
TDDはじめて物語Second Season(updated)TDDはじめて物語Second Season(updated)
TDDはじめて物語Second Season(updated)
 
TDDはじめて物語 Second Season #tddbc
TDDはじめて物語 Second Season #tddbcTDDはじめて物語 Second Season #tddbc
TDDはじめて物語 Second Season #tddbc
 
XP祭り2017 LT 「DevOps再考」(改題)
XP祭り2017 LT 「DevOps再考」(改題)XP祭り2017 LT 「DevOps再考」(改題)
XP祭り2017 LT 「DevOps再考」(改題)
 
JDK9の真の目玉機能はこれだ!
JDK9の真の目玉機能はこれだ!JDK9の真の目玉機能はこれだ!
JDK9の真の目玉機能はこれだ!
 
Java8移行は怖くない~エンタープライズ案件でのJava8移行事例~
Java8移行は怖くない~エンタープライズ案件でのJava8移行事例~Java8移行は怖くない~エンタープライズ案件でのJava8移行事例~
Java8移行は怖くない~エンタープライズ案件でのJava8移行事例~
 
「すいーとみゅーじっく」のできるまで
「すいーとみゅーじっく」のできるまで「すいーとみゅーじっく」のできるまで
「すいーとみゅーじっく」のできるまで
 

Último

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Último (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Mock object

  • 2. How it works SUT Mock Object SUT 2011 3 5
  • 3. When to use it Untested Requirement (pp.273) ↑ 2011 3 5
  • 4. Mock Object Test Stub equals Mock Object equals →Equality Pollution (pp.217) 2011 3 5
  • 5. Mock Object Equality Assertions comparator Mock Object Mock Object Mock Object Mock Object 2011 3 5
  • 6. Implementation Notes Mock Object SUT Test Spy 2011 3 5
  • 7. Mock Object 4 fixture 3 result verification phase (“final verification” ) 2011 3 5
  • 8. Fixture Setup MockObject / Exercise SUT MocK Object Result verification “final verification” Fixture teardown 2011 3 5
  • 9. Construction Four-Phase Test fixture setup phase Mock Object Configuration with Expected Values Test Double Mock Object →Hard-Coded Test Double 2011 3 5
  • 10. Installation Test Double SUT SUT Dependency Injection Dependency Lookup 2011 3 5
  • 11. Usage SUT Mock Object Assertion ( Mock Object ) 2011 3 5
  • 12. Mock Object SUT →happy path 2011 3 5
  • 13. Final Verification 1 Mock Object toolkits teardown final Verification Method 2011 3 5
  • 15. Refactoring Notes Test Double Mock Object SUT Mock Object 1 final verification method 2011 3 5
  • 16. 2011 3 5
  • 17. 2011 3 5
  • 18. JUnit3 Mock Object TestCase Assertion Method static xUnit Family NUnit static Assert Ruby Test::Unit mixins Assert 2011 3 5
  • 19. Example: Mock Object (Dynamically Generated) 2011 3 5
  • 20. Further Reading xUnit Mock Object Mock Object Test Stub Fake Object →Appnendix B(pp.741) 2011 3 5