SlideShare uma empresa Scribd logo
1 de 20
Unit Testing e Mock Object Luca S Lopomo
Obiettivi ,[object Object],[object Object],[object Object]
Problematiche dello  Unit Testing ,[object Object],[object Object]
Def: Unit Testing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Def: JUnit (il tool) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Def: Mock Object ,[object Object],[object Object],[object Object]
Esempio
Esempio - Intro ,[object Object],[object Object],[object Object]
Esempio - Intro ,[object Object],[object Object]
Esempio Class Diagram
Ex.: CacheBookServic‏e
Testing di: getBook()‏ ,[object Object],[object Object],[object Object],[object Object],[object Object]
Def: Endo Testing ,[object Object],[object Object]
Def: Mockito ,[object Object],[object Object],[object Object],[object Object]
Mockito - Vantaggi ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Mockito - Lifecycle ,[object Object],[object Object],[object Object],[object Object]
Testing: testGetBook() - 1
Testing: getBook() - 2
Testing: getBook() - 3
Grazie Domande?

Mais conteúdo relacionado

Destaque

Introduzione al Test Driven Development
Introduzione al Test Driven DevelopmentIntroduzione al Test Driven Development
Introduzione al Test Driven DevelopmentEnnio Masi
 
Che cosa twittiamo? Brand Report Italia (Maggio 2010)
Che cosa twittiamo? Brand Report Italia (Maggio 2010)Che cosa twittiamo? Brand Report Italia (Maggio 2010)
Che cosa twittiamo? Brand Report Italia (Maggio 2010)Elife Brasil
 
Valutare e certificare le competenze di asse e cittadinanza: LE COMPETENZE DI...
Valutare e certificare le competenze di asse e cittadinanza: LE COMPETENZE DI...Valutare e certificare le competenze di asse e cittadinanza: LE COMPETENZE DI...
Valutare e certificare le competenze di asse e cittadinanza: LE COMPETENZE DI...Pierfranco Ravotto
 
Time Management - Thomas Grones - edizeta
Time Management - Thomas Grones - edizetaTime Management - Thomas Grones - edizeta
Time Management - Thomas Grones - edizetaBtheONE Automotive
 
G. D'Angiolini: Server Istat di classificazioni ufficiali, gli sviluppi in co...
G. D'Angiolini: Server Istat di classificazioni ufficiali, gli sviluppi in co...G. D'Angiolini: Server Istat di classificazioni ufficiali, gli sviluppi in co...
G. D'Angiolini: Server Istat di classificazioni ufficiali, gli sviluppi in co...Istituto nazionale di statistica
 
Beacons in Context
Beacons in ContextBeacons in Context
Beacons in ContextRex St. John
 
Manuale di valutazione delle capacità genitoriali - APS-I: Assessment of Pare...
Manuale di valutazione delle capacità genitoriali - APS-I: Assessment of Pare...Manuale di valutazione delle capacità genitoriali - APS-I: Assessment of Pare...
Manuale di valutazione delle capacità genitoriali - APS-I: Assessment of Pare...Progetto Crescere Cooperativa Sociale
 
Time management - Luca Foresti
Time management - Luca ForestiTime management - Luca Foresti
Time management - Luca ForestiLuca Foresti
 
#angels4bologna - SCE 2014
#angels4bologna - SCE 2014#angels4bologna - SCE 2014
#angels4bologna - SCE 2014EPOCA
 
Time management
Time managementTime management
Time managementCDPV
 
A Gentle Introduction To Docker And All Things Containers
A Gentle Introduction To Docker And All Things ContainersA Gentle Introduction To Docker And All Things Containers
A Gentle Introduction To Docker And All Things ContainersJérôme Petazzoni
 
Why Docker
Why DockerWhy Docker
Why DockerdotCloud
 
Docker introduction
Docker introductionDocker introduction
Docker introductiondotCloud
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker, Inc.
 

Destaque (15)

Introduzione al Test Driven Development
Introduzione al Test Driven DevelopmentIntroduzione al Test Driven Development
Introduzione al Test Driven Development
 
Che cosa twittiamo? Brand Report Italia (Maggio 2010)
Che cosa twittiamo? Brand Report Italia (Maggio 2010)Che cosa twittiamo? Brand Report Italia (Maggio 2010)
Che cosa twittiamo? Brand Report Italia (Maggio 2010)
 
Valutare e certificare le competenze di asse e cittadinanza: LE COMPETENZE DI...
Valutare e certificare le competenze di asse e cittadinanza: LE COMPETENZE DI...Valutare e certificare le competenze di asse e cittadinanza: LE COMPETENZE DI...
Valutare e certificare le competenze di asse e cittadinanza: LE COMPETENZE DI...
 
Time Management - Thomas Grones - edizeta
Time Management - Thomas Grones - edizetaTime Management - Thomas Grones - edizeta
Time Management - Thomas Grones - edizeta
 
G. D'Angiolini: Server Istat di classificazioni ufficiali, gli sviluppi in co...
G. D'Angiolini: Server Istat di classificazioni ufficiali, gli sviluppi in co...G. D'Angiolini: Server Istat di classificazioni ufficiali, gli sviluppi in co...
G. D'Angiolini: Server Istat di classificazioni ufficiali, gli sviluppi in co...
 
Beacons in Context
Beacons in ContextBeacons in Context
Beacons in Context
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Manuale di valutazione delle capacità genitoriali - APS-I: Assessment of Pare...
Manuale di valutazione delle capacità genitoriali - APS-I: Assessment of Pare...Manuale di valutazione delle capacità genitoriali - APS-I: Assessment of Pare...
Manuale di valutazione delle capacità genitoriali - APS-I: Assessment of Pare...
 
Time management - Luca Foresti
Time management - Luca ForestiTime management - Luca Foresti
Time management - Luca Foresti
 
#angels4bologna - SCE 2014
#angels4bologna - SCE 2014#angels4bologna - SCE 2014
#angels4bologna - SCE 2014
 
Time management
Time managementTime management
Time management
 
A Gentle Introduction To Docker And All Things Containers
A Gentle Introduction To Docker And All Things ContainersA Gentle Introduction To Docker And All Things Containers
A Gentle Introduction To Docker And All Things Containers
 
Why Docker
Why DockerWhy Docker
Why Docker
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
 

Semelhante a Unit Testing Mockito

The Hitchhiker's Guide to testable code: semplici regole per scrivere codice ...
The Hitchhiker's Guide to testable code: semplici regole per scrivere codice ...The Hitchhiker's Guide to testable code: semplici regole per scrivere codice ...
The Hitchhiker's Guide to testable code: semplici regole per scrivere codice ...Davide Cerbo
 
PowerMock TDD User Group Milano
PowerMock TDD User Group MilanoPowerMock TDD User Group Milano
PowerMock TDD User Group MilanoMassimo Groppelli
 
Unit Tests VS End To End Tests
Unit Tests VS End To End TestsUnit Tests VS End To End Tests
Unit Tests VS End To End Testsmimmozzo_
 
Delphi & Dintorni Webinar - Diventa un mago del Testing
Delphi & Dintorni Webinar - Diventa un mago del TestingDelphi & Dintorni Webinar - Diventa un mago del Testing
Delphi & Dintorni Webinar - Diventa un mago del TestingMarco Breveglieri
 
Mocking Objects Practices
Mocking Objects PracticesMocking Objects Practices
Mocking Objects PracticesGrUSP
 
Software testing with mocking framework (Android App)
Software testing with mocking framework (Android App)Software testing with mocking framework (Android App)
Software testing with mocking framework (Android App)gioacchinolonardo
 
Unit Test di Gabriele Seroni
Unit Test di Gabriele SeroniUnit Test di Gabriele Seroni
Unit Test di Gabriele SeroniGiuneco S.r.l
 
Unit testing in Visual Studio 2013
Unit testing in Visual Studio 2013Unit testing in Visual Studio 2013
Unit testing in Visual Studio 2013DomusDotNet
 
Dependency injection: the good parts
Dependency injection:  the good partsDependency injection:  the good parts
Dependency injection: the good partsMassimo Groppelli
 
Sviluppare app native per iOS
Sviluppare app native per iOSSviluppare app native per iOS
Sviluppare app native per iOSGaspare Novara
 
Sviluppare apps native per iOS - Lo Stretto Digitale
Sviluppare apps native per iOS - Lo Stretto DigitaleSviluppare apps native per iOS - Lo Stretto Digitale
Sviluppare apps native per iOS - Lo Stretto Digitalelostrettodigitale
 
Repository pattern slides v1.1
Repository pattern slides v1.1Repository pattern slides v1.1
Repository pattern slides v1.1Christian Nastasi
 
Corso Object Oriented Analysis and Design
Corso Object Oriented Analysis and DesignCorso Object Oriented Analysis and Design
Corso Object Oriented Analysis and DesignK-Tech Formazione
 
Slide evento Code Refactoring JavaScript
Slide evento Code Refactoring JavaScriptSlide evento Code Refactoring JavaScript
Slide evento Code Refactoring JavaScriptLuca Pagliaro
 

Semelhante a Unit Testing Mockito (20)

Spring Intro
Spring IntroSpring Intro
Spring Intro
 
The Hitchhiker's Guide to testable code: semplici regole per scrivere codice ...
The Hitchhiker's Guide to testable code: semplici regole per scrivere codice ...The Hitchhiker's Guide to testable code: semplici regole per scrivere codice ...
The Hitchhiker's Guide to testable code: semplici regole per scrivere codice ...
 
PowerMock TDD User Group Milano
PowerMock TDD User Group MilanoPowerMock TDD User Group Milano
PowerMock TDD User Group Milano
 
Unit Tests VS End To End Tests
Unit Tests VS End To End TestsUnit Tests VS End To End Tests
Unit Tests VS End To End Tests
 
Delphi & Dintorni Webinar - Diventa un mago del Testing
Delphi & Dintorni Webinar - Diventa un mago del TestingDelphi & Dintorni Webinar - Diventa un mago del Testing
Delphi & Dintorni Webinar - Diventa un mago del Testing
 
Spring 2.5
Spring 2.5Spring 2.5
Spring 2.5
 
Mocking Objects Practices
Mocking Objects PracticesMocking Objects Practices
Mocking Objects Practices
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Software testing with mocking framework (Android App)
Software testing with mocking framework (Android App)Software testing with mocking framework (Android App)
Software testing with mocking framework (Android App)
 
Vb.Net
Vb.NetVb.Net
Vb.Net
 
Unit Test di Gabriele Seroni
Unit Test di Gabriele SeroniUnit Test di Gabriele Seroni
Unit Test di Gabriele Seroni
 
Unit testing in Visual Studio 2013
Unit testing in Visual Studio 2013Unit testing in Visual Studio 2013
Unit testing in Visual Studio 2013
 
Dependency injection: the good parts
Dependency injection:  the good partsDependency injection:  the good parts
Dependency injection: the good parts
 
Many Designs Elements
Many Designs ElementsMany Designs Elements
Many Designs Elements
 
Testing
TestingTesting
Testing
 
Sviluppare app native per iOS
Sviluppare app native per iOSSviluppare app native per iOS
Sviluppare app native per iOS
 
Sviluppare apps native per iOS - Lo Stretto Digitale
Sviluppare apps native per iOS - Lo Stretto DigitaleSviluppare apps native per iOS - Lo Stretto Digitale
Sviluppare apps native per iOS - Lo Stretto Digitale
 
Repository pattern slides v1.1
Repository pattern slides v1.1Repository pattern slides v1.1
Repository pattern slides v1.1
 
Corso Object Oriented Analysis and Design
Corso Object Oriented Analysis and DesignCorso Object Oriented Analysis and Design
Corso Object Oriented Analysis and Design
 
Slide evento Code Refactoring JavaScript
Slide evento Code Refactoring JavaScriptSlide evento Code Refactoring JavaScript
Slide evento Code Refactoring JavaScript
 

Unit Testing Mockito