Tags » Mockito

Some thoughts on JUnit Test with Mockito

In the past a few days I’ve worked on writing unit tests for a service. It was a completely different experience. The unit tests I wrote before were very simple ones with several assertions and that’s it. 423 more words

Java

UNIT TESTING EXERCISE WITH FIZZBUZZ AND MOCKITO

Click to Read: I sometimes use FizzBuzz to demonstrate the basics of unit testing to newbies. Although FizzBuzz is really simple problem, it can also be used to demonstrate more advanced unit testing techniques like mocking.

Testing

It's All About Tests - Part 3

In the previous two posts I discussed mostly about the philosophy and attitude of developing with testing.
In this post I give some tips and tools examples for testing. 802 more words

Craftsmanship

It's All About Tests - Part 2

This is the second post of the series about testing.
In the first part I explained about the mindset we need to have while developing with tests. 833 more words

Craftsmanship

It's All About Tests - Part 1

This post is the first of a series of three.
1. Mindset of testing
2. Techniques
3. Tools and Tips

The Mindset

Testing code is something that needs to be learned. 912 more words

Craftsmanship

How to use Robolectric and still make real HTTP requests

Recently, I have been writing some unit tests for my application using Robolectric. The framework and plugin has allowed me to write some plain unit tests using Mockito which is great, however, today I came across a feature that I didn’t want to take advantage of. 264 more words

Development