<?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><![CDATA[
method names should start with lowercase character
     ]]></description>
        <expected-problems>1</expected-problems>
        <code><![CDATA[
public class Foo {
 void Bar() {}
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
method names should not contain underscores
     ]]></description>
        <expected-problems>1</expected-problems>
        <code><![CDATA[
public class Foo {
 void bar_foo() {}
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
all is well
     ]]></description>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
public class Foo {
 void foo() {}
}
     ]]></code>
    </test-code>
    <test-code>
        <description>#1288 MethodNamingConventions for native should be deactivated</description>
        <rule-property name="checkNativeMethods">false</rule-property>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
public class Foo {
    protected final native void __surfunc__(float[] data);
}
        ]]></code>
    </test-code>
    <test-code>
        <description>#1288 MethodNamingConventions for native should be deactivated - prevent false negative</description>
        <rule-property name="checkNativeMethods">true</rule-property>
        <expected-problems>1</expected-problems>
        <expected-linenumbers>2</expected-linenumbers>
        <code><![CDATA[
public class Foo {
    protected final native void __surfunc__(float[] data);
}
        ]]></code>
    </test-code>
    <test-code>
        <description>#1343 MethodNamingConventions for overrided methods</description>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
public class MethodNamingConventions implements SomeInterface {
    @Override
    public void _foo() {
    }
}
        ]]></code>
    </test-code>
</test-data>
