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

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
10,488
On Slideshare
4,415
From Embeds
6,073
Number of Embeds
19

Actions

Shares
Downloads
86
Comments
0
Likes
6

Embeds 6,073

http://blog.mycila.com 3,994
http://www.montreal-jug.org 1,592
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 9
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

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • - 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

Transcript

  • 1. Mathieu Carbou, 13/10/2011 github.com/Ovea/conf-junit montreal-jug.org junit.org Advanced Junit
  • 2.
    • Junit basics
    • 3. Junit advanced
    • 4. Experimental features
    • 5. Mockito
    Schedule
  • 6.
    • @Test
    Junit basics
  • 7.
    • @Test
    • 8. @Before, @After
    • 9. @BeforeClass, @AfterClass
    Junit basics
  • 10.
    • @BeforeClass
    • 11. For each @Test
    • @AfterClass
    Junit lifecycle
  • 15. Junit basics
  • 19. Junit basics
  • 24.
    • Hamcrest
    Junit advanced http://code.google.com/p/hamcrest
  • 25.
    • Hamcrest
    • 26. @ClassRule & @Rule
    Junit advanced
  • 27. public interface TestRule { Statement apply( Statement base, Description description); } @Rule Statement @ClassRule Statement Junit advanced
  • 28. Junit advanced
  • 31. Junit runners Runner ParentRunner BlockJUnit4ClassRunner Suite Junit4 RunnerScheduler
  • 32. public interface RunnerScheduler { void schedule(Runnable childStatement ); void finished(); } childStatement Scheduling
  • 33.
    • Enclosed runner
    Experimentals
  • 34.
    • Enclosed runner
    • 35. @Category
    Experimentals
  • 36. Experimentals
  • 39.
      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
  • 40. QUESTIONS ? Advanced Junit