Step 1: Create a simple maven project say “code-quality”
Step 2: Import into eclipse.
#1. Validator code & unit testing
Step 3: Validator interface &
…
Step 1: Create a simple maven project say “code-quality”
Step 2: Import into eclipse.
#1. Validator code & unit testing
Step 3: Validator interface &
…
Step 1: Create a simple Maven project from a command-line. Just press enter for all the prompts.
Step 2: Import the above “simple-mocking-test”
…
This extends Part 1: Unit testing with JUnit, Mockito & Spring by mocking the DAO layer with the Mockito framework. Step 1: Service and DAO layer interfaces and implementations Service...
This extends Part 2: Mockito to fully mock the DAO layer by modifying the service layer to demonstrate partial mocking with “Mockito.spy”. In the “SimpleServiceImpl” we are interested in only...
This extends Part 3: Mockito partially mocking with @Spy by making the method “processUser(int id)” as a private method. Mockito framework cannot mock “private” … Read more ›...
This extends Part 4: Mockito & PowerMock for partially mocking private methods to mock “static” methods.
How to use both Spring JUnit and PowerMock runners?…
Q1 Why use mock objects in unit testing? A1 Unit testing is widely accepted as a “best practice” for software development. When you write an object, … Read more ›...
This is an integration testing that tests Spring transaction through service, and DAO layers all the way up to the embedded database like HSQLDB or H2. After commit or rollback,...
Q1. What is BDD? A1. BDD is principally an idea about how software development should be managed by both business interests and technical insight. Test-driven development focuses on the developer’s...
To appreciate jBehave, let’s look at a better example here. This example is about a science formula Speed = distance / Time. So, … Read more ›...