Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Below is minimal code that can be used as a template for writing org.lcsim test cases. It is not meant as an example, working test case but as an illustration of the essential parts of a JUnit test case. Each section will be covered in detail.

No Format
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

public class TestCaseExample extends TestCase
{
    public void TestCaseExample() throws Exception
    {}

    public static Test suite()
    {
        return new TestSuite(TestCaseExample.class);
    }

    protected void setUp() throws Exception
    {
        // DO SETUP HERE
    }

    public void testIt() throws Exception
    {
        // DO TEST HERE
    }
}

...