<?xml version="1.0" encoding="UTF-8"?>
<test-data>
    <test-code>
        <description><![CDATA[
JUnit 4 - Contains assert
     ]]></description>
        <expected-problems>1</expected-problems>
        <code><![CDATA[
import java.lang.Thread;
public class Foo {
    @Test
    public void foo() throws Throwable {
        TypeSet.Resolver r = new TypeSet.ImplicitImportResolver();
        try {
            r.resolve("PMD");
            fail("Should have thrown an exception");
        } catch (ClassNotFoundException cnfe) {

        }
    }
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
Junit 3 format
     ]]></description>
        <expected-problems>1</expected-problems>
        <code><![CDATA[
import java.lang.Thread;
import junit.framework.TestCase;
public class Foo extends TestCase {
    public void testFoo() throws Throwable {
        TypeSet.Resolver r = new TypeSet.ImplicitImportResolver();
        try {
            r.resolve("PMD");
            fail("Should have thrown an exception");
        } catch (ClassNotFoundException cnfe) {

        }
    }
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
Junit 3 format
     ]]></description>
        <expected-problems>2</expected-problems>
        <code><![CDATA[
import java.lang.Thread;
import junit.framework.TestCase;
public class Foo extends TestCase {
    public void testFoo() throws Throwable {
        TypeSet.Resolver r = new TypeSet.ImplicitImportResolver();
        try {
            r.resolve("PMD");
            fail("Should have thrown an exception");
        } catch (ClassNotFoundException cnfe) {

        }
        try {
            r.resolve("PMD");
            fail("Should have thrown an exception");
        } catch (ClassNotFoundException cnfe) {

        }
    }
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
Throws 
     ]]></description>
        <expected-problems>1</expected-problems>
        <code><![CDATA[
import java.lang.Thread;
import junit.framework.TestCase;
public class Foo extends TestCase {
    public void testFoo() throws Throwable {
        TypeSet.Resolver r = new TypeSet.ImplicitImportResolver();
        try {
            r.resolve("PMD");
            throw new RuntimeException("Should have thrown an exception");
        } catch (ClassNotFoundException cnfe) {

        }
    }
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
This method can be broken into two, each checking
     ]]></description>
        <expected-problems>2</expected-problems>
        <code><![CDATA[
import java.lang.Thread;
import junit.framework.TestCase;
public class Foo extends TestCase {
    public void testFoo() throws Throwable {
        TypeSet.Resolver r = new TypeSet.ImplicitImportResolver();
        try {
            r.resolve("PMD");
            throw new RuntimeException("Should have thrown an exception");
        } catch (ClassNotFoundException cnfe) {
        // one
        }
        try {
            r.resolve("FOO");
            throw new RuntimeException("Should have thrown an exception also");
        } catch (ClassNotFoundException cnfe) {
        // another
        }
    }
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
Not a JUnit class - Contains assert
     ]]></description>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
import java.lang.Thread;
public class Foo {
    public void foo() throws Throwable {
        TypeSet.Resolver r = new TypeSet.ImplicitImportResolver();
        try {
            r.resolve("PMD");
            fail("Should have thrown an exception");
        } catch (ClassNotFoundException cnfe) {

        }
    }
}
     ]]></code>
    </test-code>
</test-data>
