Advanced junit and mockito
Upcoming SlideShare
Loading in...5
×
 

Advanced junit and mockito

on

  • 10,224 views

 

Statistics

Views

Total Views
10,224
Views on SlideShare
4,152
Embed Views
6,072

Actions

Likes
6
Downloads
82
Comments
0

19 Embeds 6,072

http://blog.mycila.com 3994
http://www.montreal-jug.org 1592
http://flavors.me 176
http://mathieucarbou.me 133
http://8347429717895274754_26dc7058bbc2666eb9d2637dc3b3773ca2b21c80.blogspot.com 103
http://feeds2.feedburner.com 25
http://blog.mathieucarbou.me 17
http://newsblur.com 8
http://translate.googleusercontent.com 8
http://www.linkedin.com 4
http://paper.li 3
http://www.montreal-jug.org.web04.ovea.com 2
http://digg.com 1
http://ranksit.com 1
http://www.tuicool.com 1
http://mycila.blogspot.com 1
http://mathieucarbou.tumblr.com 1
http://mycila.blogspot.ca 1
http://webcache.googleusercontent.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • - presentation: expert en java & design, Depuis 16 ans (jdk 1 – sous windows) specialiste en dev web (5 ans), Infra maven Archi backend (web service, clustering, event driven, ajax & reverse-ajax) - presentation sera sur mon blog
  • - presentation: expert en java & design, Depuis 16 ans (jdk 1 – sous windows) specialiste en dev web (5 ans), Infra maven Archi backend (web service, clustering, event driven, ajax & reverse-ajax) - presentation sera sur mon blog

Advanced junit and mockito Advanced junit and mockito Presentation Transcript

  • Mathieu Carbou, 13/10/2011 github.com/Ovea/conf-junit montreal-jug.org junit.org Advanced Junit
    • Junit basics
    • Junit advanced
    • Experimental features
    • Mockito
    Schedule
    • @Test
    Junit basics
    • @Test
    • @Before, @After
    • @BeforeClass, @AfterClass
    Junit basics
    • @BeforeClass
    • For each @Test
              • Instanciate test class
              • @Before
              • Invoke the test
              • @After
    • @AfterClass
    Junit lifecycle
    • @Test
    • @Before, @After
    • @BeforeClass, @AfterClass
    • Suites
    Junit basics
    • @Test
    • @Before, @After
    • @BeforeClass, @AfterClass
    • Suites
    • Assertions
    Junit basics
    • Hamcrest
    Junit advanced http://code.google.com/p/hamcrest
    • Hamcrest
    • @ClassRule & @Rule
    Junit advanced
  • public interface TestRule { Statement apply( Statement base, Description description); } @Rule Statement @ClassRule Statement Junit advanced
    • Hamcrest
    • @ClassRule & @Rule
    • @RunWith
    Junit advanced
  • Junit runners Runner ParentRunner BlockJUnit4ClassRunner Suite Junit4 RunnerScheduler
  • public interface RunnerScheduler { void schedule(Runnable childStatement ); void finished(); } childStatement Scheduling
    • Enclosed runner
    Experimentals
    • Enclosed runner
    • @Category
    Experimentals
    • Enclosed runner
    • @Category
    • @Theory
    Experimentals
    • http://code.google.com/p/mockito/wiki/FeaturesAndMotivations http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html
    expect-run-verify stubbing-run-(verify) VS Mockito EasyMock JMock Mockito
  • QUESTIONS ? Advanced Junit