% Off Udemy Coupon - CoursesWyn

Learn Java Unit Testing with Junit & Mockito in 30 Steps

Learn Mockito and JUnit - the most popular Java unit testing and mocking frameworks - with 25 Examples

$9.99 (90% OFF)
Get Course Now

About This Course

<div>Writing Great Unit Tests distinguishes Good Programmers from Great Programmers.</div><div><br></div><div>In this course, you will learn how to Write Great Java Unit Tests with Mockito and JUnit.</div><div><br></div><div>WHAT OUR LEARNERS ARE SAYING:</div><div><ul><li><span style="font-size: 1rem;">5 STARS - When I’ve started this course I had very basic knowledge of JUnit and Mockito and now everything is clearer. It is a very good course for beginners. Everything was very well explained.&nbsp;</span></li><li><span style="font-size: 1rem;">5 STARS - As always, Ranga offers an excellent way of teaching: coding from scratch, good explanation, useful examples for the real world job. He is not only an experienced programmer, but also a great teacher. I learned more than I expected. Thanks</span></li><li><span style="font-size: 1rem;">5 STARS - It was my long time wish to learn Mockito and this instructor nailed it. Best 5hrs I spent ever. He is really good in what he is doing.&nbsp;</span></li><li><span style="font-size: 1rem;">5 STARS - This course is a great tutorial to unit testing and standard practices of mocking. I would recommend it to even experienced developers who would be surprised to find some new ideas in here. Explanations are precise and detailed. Well done.</span></li><li><span style="font-size: 1rem;">5 STARS - Very interesting course with good examples. Every topic was easy to understand because of author's awesome explanation. I rate this course as 5/5.</span></li><li><span style="font-size: 1rem;">5 STARS - Very good course. The approach is very systematic and step by step. I really like the combination of theory and practical goes hand by hand. The journey from JUnit to Mockito to Powermock is very well described.</span></li></ul></div><div><span style="font-size: 1rem;">COURSE HIGHLIGHTS</span></div><div><br></div><div>You take 12 steps with JUnit and 18 steps with Mockito into unit testing proficiency.</div><div><br></div><div>Mocking with Mockito</div><div><ul><li><span style="font-size: 1rem;">Step 01 : Set up an Eclipse Project with JUnit and Mockito frameworks. First Green Bar.</span></li><li><span style="font-size: 1rem;">Step 02 : Example to start understanding why we need mocks.</span></li><li><span style="font-size: 1rem;">Step 03 : What is a stub? Create an unit test using Stub? Disadvantages of Stubs.</span></li><li><span style="font-size: 1rem;">Step 04 : Your first Mockito code! Hurrah!!! Lets use Mockito to mock TodoService.</span></li><li><span style="font-size: 1rem;">Step 05 : Stubbing variations with Mockito. A few mockito examples mocking List class : Multiple return values, Argument Matchers and throwing exceptions.</span></li><li><span style="font-size: 1rem;">Step 06 : Introduction to BDD. Given When Then. BDD Mockito Syntax.</span></li><li><span style="font-size: 1rem;">Step 07 : How to verify calls on a mock? Verify how many times a method is called. We will add deleteTodo method to the TodoService.</span></li><li><span style="font-size: 1rem;">Step 08 : How to capture an argument which is passed to a mock?</span></li><li><span style="font-size: 1rem;">Step 09 : Hamcrest Matchers.</span></li><li><span style="font-size: 1rem;">Step 10 : Let's simplify things with Mockito Annotations. @Mock, @InjectMocks, @RunWith(MockitoJUnitRunner.class), @Captor</span></li><li><span style="font-size: 1rem;">Step 11 : JUnit Rules. Using MockitoJUnit.rule() instead of @RunWith(MockitoJUnitRunner.class).</span></li><li><span style="font-size: 1rem;">Step 12 : Real world Example with Spring</span></li><li><span style="font-size: 1rem;">Step 13 : What is a spy? How to spy with Mockito?</span></li><li><span style="font-size: 1rem;">Step 14 : Some Theory : Why does Mockito not allow stubbing final and private methods?</span></li><li><span style="font-size: 1rem;">Step 15 : Using PowerMock and Mockito to mock a Static Method.</span></li><li><span style="font-size: 1rem;">Step 16 : Using PowerMock and Mockito to invoke a private Method.</span></li><li><span style="font-size: 1rem;">Step 17 : Using PowerMock and Mockito to mock a constructor.</span></li><li>Step 18 : Good Unit Tests.</li></ul></div><div><span style="font-size: 1rem;">JUnit Framework</span></div><div><ul><li><span style="font-size: 1rem;">Step 01 : Need for Unit Testing</span></li><li><span style="font-size: 1rem;">Step 02 : Setting up your First JUnit</span></li><li><span style="font-size: 1rem;">Step 03 : First Successful JUnit. Green Bar and assertEquals</span></li><li><span style="font-size: 1rem;">Step 04 : Refactoring Your First JUnit Test</span></li><li><span style="font-size: 1rem;">Step 05 : Second JUnit Example assertTrue and assertFalse</span></li><li><span style="font-size: 1rem;">Step 06 : @Before @After</span></li><li><span style="font-size: 1rem;">Step 07 : @BeforeClass @AfterClass</span></li><li><span style="font-size: 1rem;">Step 08 : Comparing Arrays in JUnit Tests</span></li><li><span style="font-size: 1rem;">Step 09 : Testing Exceptions in JUnit Tests</span></li><li><span style="font-size: 1rem;">Step 10 : Testing Performance in JUnit Tests</span></li><li><span style="font-size: 1rem;">Step 11 : Parameterized Tests</span></li><li><span style="font-size: 1rem;">Step 12 : Organize JUnits into Suites</span></li></ul></div><div><br></div><div>Start Learning Now. Hit the Enroll Button!</div>

What you'll learn:

  • You will Understand the Basics of Unit Testing with JUnit
  • You will Learn the Most Popular Mocking Framework - Mockito
  • You will Learn to Write Great Unit Tests using Mocking
  • You will Learn to Use Mockito in combination with Junit and PowerMock