<?xml version="1.0" encoding="UTF-8"?>
<test-data
    xmlns="http://pmd.sourceforge.net/rule-tests"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://pmd.sourceforge.net/rule-tests http://pmd.sourceforge.net/rule-tests_1_0_0.xsd">

    <test-code>
        <description>TEST1</description>
        <expected-problems>1</expected-problems>
        <expected-linenumbers>2</expected-linenumbers>
        <code><![CDATA[
public class Foo {
    int foo;
}
        ]]></code>
    </test-code>

    <test-code>
        <description>TEST2</description>
        <expected-problems>1</expected-problems>
        <expected-linenumbers>2</expected-linenumbers>
        <code><![CDATA[
public class Foo {
    String foo;
}
        ]]></code>
    </test-code>

    <test-code>
        <description>TEST3</description>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
public class Foo {
    class Bar {
        Foo foo;
    }
}
        ]]></code>
    </test-code>

    <test-code>
        <description>TEST4</description>
        <expected-problems>1</expected-problems>
        <expected-linenumbers>3</expected-linenumbers>
        <code><![CDATA[
public class Foo {
    class Bar {
        String bar;
    }
}
        ]]></code>
    </test-code>

    <test-code>
        <description>interface</description>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
public interface Foo {
    public String foo();
}
        ]]></code>
    </test-code>

    <test-code>
        <description>false negative with fields in interfaces and nested classes</description>
        <expected-problems>2</expected-problems>
        <expected-linenumbers>4,7</expected-linenumbers>
        <code><![CDATA[
interface Operation {
    Object apply();

    final Operation OPERATION = () -> { return null; };

    class Inner {
        int inner;
    }
}
        ]]></code>
    </test-code>
</test-data>
