Category Archives: JUnit

Nested classes with JUnit

Recently I was playing with JUnit 4.X.  I wanted to be able to define tests in nested classes as I had before with NUnit.  This was to facilitate BDD-ish test definitions, where I break up unit tests by test context. … Continue reading 

Also posted in Agile Project Coaching & Management | 3 Comments

JUnit 4 TestSuite Declaration

This is mainly for my own reference but if it helps people out there great!  The documentation on this aspect of JUnit is very poor. package agalliao.wealthManagment.domain;import org.junit.runner.RunWith;import org.junit.runners.Suite; @RunWith(Suite.class)@Suite.SuiteClasses({ investmentTests.class, catalogTests.class, markerTests.class })public class AllTests { // why on … Continue reading 

Also posted in Java | 28 Comments