<?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>Problematic apex unit test class - uses SeeAllData = true</description>
        <expected-problems>1</expected-problems>
        <code><![CDATA[
@isTest (seeAllData = true)
public class Foo {
   public static testMethod void testSomething() {
      Account a = null;
      // This is better than having a NullPointerException
      System.assertNotEquals(a, null, 'account not found');
   }
}
        ]]></code>
    </test-code>

    <test-code>
        <description>Problematic apex unit test method - uses SeeAllData = true</description>
        <expected-problems>1</expected-problems>
        <code><![CDATA[
@isTest
public class Foo {
   @isTest (seeAllData = true)
   public static void testSomething() {
      Account a = null;
      // This is better than having a NullPointerException
      System.assertNotEquals(a, null, 'account not found');
   }
}
        ]]></code>
    </test-code>
    
    <test-code>
        <description>[apex] ApexUnitTestShouldNotUseSeeAllDataTrue false negative due to casing (regression in PMD 7) #5095</description>
        <expected-problems>9</expected-problems>
        <expected-linenumbers>2,5,10,15,20,25,30,35,40</expected-linenumbers>
        <code><![CDATA[
@isTest(SeeAllData = true)
public class SomeTest {

    @IsTest(SeeAllData=true)
    public static void testMethod1() {
        System.assertEquals(1 + 2, 3);
    }

    @isTest(SeeAllData=true)
    public static void testMethod2() {
        System.assertEquals(1 + 2, 3);
    }

    @IsTest(seeAllData=true)
    public static void testMethod3() {
        System.assertEquals(1 + 2, 3);
    }

    @isTest(seeAllData=true)
    public static void testMethod4() {
        System.assertEquals(1 + 2, 3);
    }

    @IsTest(SeeAllData=True)
    public static void testMethod5() {
        System.assertEquals(1 + 2, 3);
    }

    @isTest(SeeAllData=True)
    public static void testMethod6() {
        System.assertEquals(1 + 2, 3);
    }

    @IsTest(seeAllData=True)
    public static void testMethod7() {
        System.assertEquals(1 + 2, 3);
    }

    @isTest(seeAllData=True)
    public static void testMethod8() {
        System.assertEquals(1 + 2, 3);
    }
}
]]></code>
    </test-code>
</test-data>
