<?xml version="1.0" encoding="UTF-8"?>
<test-data>
    <test-code>
        <description><![CDATA[
Five stmts in one switch case, should be flagged
     ]]></description>
        <rule-property name="minimum">4</rule-property>
        <expected-problems>1</expected-problems>
        <code><![CDATA[
// Switch Density = 5.0
public class SwitchDensity1 {
 public void foo(int i) {
  switch (i) {
  case 0:
  {
   System.err.println("I am a fish.");
   System.err.println("I am a fish.");
   System.err.println("I am a fish.");
   System.err.println("I am a fish.");
   System.err.println("I am a fish.");
  }
  }
 }
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
One stmt in one switch case, ok
     ]]></description>
        <rule-property name="minimum">4</rule-property>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
// Switch Density = 1.0
public class SwitchDensity2 {
       public void foo(int i) {
               switch (i) {
                       case 0:
                       {
                        System.err.println("I am a fish.");
                       }
               }
       }
}
     ]]></code>
    </test-code>
    <test-code>
        <description><![CDATA[
Five stmts, 5 cases, OK
     ]]></description>
        <rule-property name="minimum">4</rule-property>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
// Switch Density = 1.0
public class SwitchDensity3 {
       public void foo(int i) {
               switch (i) {
                       case 0:
                       case 1:
                       case 2:
                       case 3:
                       case 4:
                       {
                        System.err.println("I am a fish.");
                        System.err.println("I am a fish.");
                        System.err.println("I am a fish.");
                        System.err.println("I am a fish.");
                        System.err.println("I am a fish.");
                       }
               } 
       }
}
     ]]></code>
    </test-code>
</test-data>
