<?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>short</description>
        <rule-property name="minimum">13</rule-property>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
public class Foo {
    public Foo() {
		bar();
    }
}
		]]></code>
    </test-code>
    
    <test-code>
        <description>lots of comments</description>
        <rule-property name="minimum">13</rule-property>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
public class Foo {
    public Foo() {
		//nothing to see here
		//nothing to see here
		//nothing to see here
		//nothing to see here
		bar();
		//nothing to see here
		//nothing to see here
		//nothing to see here
		//nothing to see here
		foo();
    }
}
		]]></code>
    </test-code>
    
    <code-fragment id="long-constructor"><![CDATA[
public class Foo {
    public Foo() {
     //nothing to see here
     //nothing to see here
     //nothing to see here
     //nothing to see here
     bar();
     bar();
     bar();
     bar();
     bar();
     bar();
     //nothing to see here
     //nothing to see here
     //nothing to see here
     //nothing to see here
     foo();
     foo();
     foo();
     foo();
     foo();
     foo();
    }
}
     ]]></code-fragment>
     
    <test-code>
        <description>long constructor</description>
        <rule-property name="minimum">13</rule-property>
        <expected-problems>1</expected-problems>
        <code-ref id="long-constructor"/>
    </test-code>
    
    <test-code>
        <description>long method - changed minimum</description>
        <!-- obtained this value by using NCSS directly -->
        <rule-property name="minimum">14</rule-property>
        <expected-problems>0</expected-problems>
        <code-ref id="long-constructor"/>
    </test-code>
    
    <test-code>
        <description>ignore non-constructor methods</description>
        <rule-property name="minimum">10</rule-property>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
public class Foo {
    public void bar() {
		bar();
		bar();
		bar();
		bar();
		bar();
		bar();
		bar();
		bar();
		bar();
		bar();
		bar();
		bar();
		bar();
		bar();
		bar();
		bar();
    }
}
		]]></code>
    </test-code>
    
</test-data>
