Tags » JUnit

JUnit 4 - parameterised test example

The class under test:

public class Solution {
  static final int base = 10;
  final static String convertToBase (long number, int base){
     String stringValue = Long.toString(number,base);
     return stringValue;
} 139 more words

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


JUnit: The method assertNotEquals(Long, Long) is undefined

When I run JUnit, The method assertNotEquals(Long, Long) is undefined for the type Class Error thrown

To solve this


import static org.hamcrest.CoreMatchers.*;


instead of… 16 more words


Cucumber Spring Integration

I have a normal Spring-enabled project arranged as a Maven project. There were already JUnit tests in the project, along with the requisite Spring configuration. 1,287 more words


JUnit- A Unit Testing Framework

JUnit is a unit testing framework for the Java programming language. JUnit has been important in the development of test-driven development, and is one of a family of unit testing frameworks collectively known as xUnit that originated with JUnit. 13 more words


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


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