This is a focused guide with lots of practical recipes with presentations of business issues and presentation of the whole test of the system. This book shows the use of Mockito's popular unit testing frameworks such as JUnit, PowerMock, TestNG, and so on. If you are a software developer with no testing experience (especially with Mockito) and you want to start using Mockito in the most efficient way then this book is for you. This book assumes that you have a good knowledge level and understanding of Java-based unit testing frameworks.
What people are saying - Write a review
We haven't found any reviews in the usual places.
annotation argument matchers AssertJ AssertJ's BDDAssertions.then BDDMockito.given bean Behavior with Object bytecode classpath Creating mocks Creating spies dependency Dependency Injection doit double taxFactor EasyMock example final classes final TaxService taxService following code following steps Getting ready Getting Started Gettingready Gradle Guice Hamcrest matchers Hamcrest's assertThat howto implementation Injecting test doubles InjectMocks interface JMock JMockit json Jukito JUnit Kent Beck List<Person Martin Fowler Maven MeanTaxFactorCalculator systemUnderTest method executions methods Stubbing mock's Mockito documentation NewIdentityCreator newSiblings Object Matchers ofthe partial mocks perform the following person.getName PersonDataUpdater PersonSaver PowerMock PrepareForTest previous recipe private final TaxService public class public double Refactoring refer to Chapter Referto return custom answers return false RunWith(MockitoJUnitRunner.class Spock Started with Mockito static final double static methods Stubbing methods Stubbing void methods System.out.printf("Calling tax factor TaxFactorFetcher TaxFactorProcessor TaxFactorService taxService.transferTaxFor(person TaxTransferer Test public void TestNG configuration There's this.taxService throw exceptions transferTaxFor(Person person varargs Verifying Behavior web service xUnit