// Path: src/main/java/org/dmfs/rfc5545/recur/RecurrenceRule.java
// public enum RfcMode
// {
//     /**
//      * Parses recurrence rules according to <a href="http://tools.ietf.org/html/rfc2445#section-4.3.10">RFC 2445</a>. Every error will cause an exception to
//      * be thrown.
//      */
//     RFC2445_STRICT,
// 
//     /**
//      * Parses recurrence rules according to <a href="http://tools.ietf.org/html/rfc2445#section-4.3.10">RFC 2445</a> in a more tolerant way. The parser will
//      * just skip invalid parts in the rule and won't complain as long as the result is a valid rule. <p> This mode also accepts rules that comply with <a
//      * href="http://tools.ietf.org/html/rfc5545#section-3.3.10">RFC 5545</a>. </p> <p> <strong>Note:</strong> Using this mode rules are evaluated
//      * differently than with {@link #RFC5545_LAX}. {@link #RFC5545_LAX} will just drop all invalid parts and evaluate the rule according to RFC 5545. This
//      * mode will evaluate all rules. <p> Also this mode will output rules that comply with RFC 2445. </p>
//      */
//     RFC2445_LAX,
// 
//     /**
//      * Parses recurrence rules according to <a href="http://tools.ietf.org/html/rfc5545#section-3.3.10">RFC 5545</a>. Every error will cause an exception to
//      * be thrown.
//      */
//     RFC5545_STRICT,
// 
//     /**
//      * Parses recurrence rules according to <a href="http://tools.ietf.org/html/rfc5545#section-3.3.10">RFC 5545</a> in a more tolerant way. The parser will
//      * just skip invalid parts in the rule and won't complain as long as the result is a valid rule. <p> This mode also accepts rules that comply with <a
//      * href="http://tools.ietf.org/html/rfc2445#section-4.3.10">RFC 2445</a> but not with RFC 5545. </p> <p> <strong>Note:</strong> Using this mode rules
//      * are evaluated differently than with {@link #RFC2445_LAX}. This mode will just drop all invalid parts and evaluate the rule according to RFC 5545.
//      * {@link #RFC2445_LAX} will evaluate all rules. <p> Also this mode will output rules that comply with RFC 5545. </p>
//      */
//     RFC5545_LAX;
// }


import static org.junit.Assert.*;
import java.util.ArrayList;
import java.util.List;
import org.dmfs.rfc5545.recur.RecurrenceRule.RfcMode;
import org.junit.Test;
		TEST_RULES.add(new InvalidTestRule("FREQ=YEARLY;BYDAY=1UZ", "FREQ=YEARLY"));
		TEST_RULES.add(new InvalidTestRule("FREQ=YEARLY;BYDAY=1WE,2WE,-1WE,55WE", "FREQ=YEARLY;BYDAY=1WE,2WE,-1WE"));
		TEST_RULES.add(new InvalidTestRule("FREQ=YEARLY;INTERVAL=0", "FREQ=YEARLY"));
		TEST_RULES.add(new InvalidTestRule("FREQ=YEARLY;INTERVAL=MO", "FREQ=YEARLY"));
		TEST_RULES.add(new InvalidTestRule("FREQ=YEARLY;COUNT=-200", "FREQ=YEARLY"));
		TEST_RULES.add(new InvalidTestRule("FREQ=YEARLY;COUNT=abc", "FREQ=YEARLY"));
		TEST_RULES.add(new InvalidTestRule("FREQ=YEARLY;INTERVAL=-1", "FREQ=YEARLY"));
		TEST_RULES.add(new InvalidTestRule("FREQ=DAILY;BYWEEKNO=1,5,8", "FREQ=YEARLY;BYWEEKNO=1,5,8"));
		TEST_RULES.add(new InvalidTestRule("FREQ=MONTHLY;UNTIL=20120924T215959ZZ", "FREQ=MONTHLY;UNTIL=20120924T215959Z"));
	}

	private static class InvalidTestRule
	{
		public final String mInvalidRule;
		public final String mExpectedResult;


		public InvalidTestRule(String invalidRule, String expectedResult)
		{
			mInvalidRule = invalidRule;
			mExpectedResult = expectedResult;
		}


		public void testLaxMode()
		{
			if (mExpectedResult != null)
			{
				try
				{
// Path: src/main/java/org/dmfs/rfc5545/recur/RecurrenceRule.java
// public enum RfcMode
// {
//     /**
//      * Parses recurrence rules according to <a href="http://tools.ietf.org/html/rfc2445#section-4.3.10">RFC 2445</a>. Every error will cause an exception to
//      * be thrown.
//      */
//     RFC2445_STRICT,
// 
//     /**
//      * Parses recurrence rules according to <a href="http://tools.ietf.org/html/rfc2445#section-4.3.10">RFC 2445</a> in a more tolerant way. The parser will
//      * just skip invalid parts in the rule and won't complain as long as the result is a valid rule. <p> This mode also accepts rules that comply with <a
//      * href="http://tools.ietf.org/html/rfc5545#section-3.3.10">RFC 5545</a>. </p> <p> <strong>Note:</strong> Using this mode rules are evaluated
//      * differently than with {@link #RFC5545_LAX}. {@link #RFC5545_LAX} will just drop all invalid parts and evaluate the rule according to RFC 5545. This
//      * mode will evaluate all rules. <p> Also this mode will output rules that comply with RFC 2445. </p>
//      */
//     RFC2445_LAX,
// 
//     /**
//      * Parses recurrence rules according to <a href="http://tools.ietf.org/html/rfc5545#section-3.3.10">RFC 5545</a>. Every error will cause an exception to
//      * be thrown.
//      */
//     RFC5545_STRICT,
// 
//     /**
//      * Parses recurrence rules according to <a href="http://tools.ietf.org/html/rfc5545#section-3.3.10">RFC 5545</a> in a more tolerant way. The parser will
//      * just skip invalid parts in the rule and won't complain as long as the result is a valid rule. <p> This mode also accepts rules that comply with <a
//      * href="http://tools.ietf.org/html/rfc2445#section-4.3.10">RFC 2445</a> but not with RFC 5545. </p> <p> <strong>Note:</strong> Using this mode rules
//      * are evaluated differently than with {@link #RFC2445_LAX}. This mode will just drop all invalid parts and evaluate the rule according to RFC 5545.
//      * {@link #RFC2445_LAX} will evaluate all rules. <p> Also this mode will output rules that comply with RFC 5545. </p>
//      */
//     RFC5545_LAX;
// }


// Path: src/test/java/org/dmfs/rfc5545/recur/InvalidRuleTest.java
import static org.junit.Assert.*;
import java.util.ArrayList;
import java.util.List;
import org.dmfs.rfc5545.recur.RecurrenceRule.RfcMode;
import org.junit.Test;

		TEST_RULES.add(new InvalidTestRule("FREQ=YEARLY;BYDAY=1UZ", "FREQ=YEARLY"));
		TEST_RULES.add(new InvalidTestRule("FREQ=YEARLY;BYDAY=1WE,2WE,-1WE,55WE", "FREQ=YEARLY;BYDAY=1WE,2WE,-1WE"));
		TEST_RULES.add(new InvalidTestRule("FREQ=YEARLY;INTERVAL=0", "FREQ=YEARLY"));
		TEST_RULES.add(new InvalidTestRule("FREQ=YEARLY;INTERVAL=MO", "FREQ=YEARLY"));
		TEST_RULES.add(new InvalidTestRule("FREQ=YEARLY;COUNT=-200", "FREQ=YEARLY"));
		TEST_RULES.add(new InvalidTestRule("FREQ=YEARLY;COUNT=abc", "FREQ=YEARLY"));
		TEST_RULES.add(new InvalidTestRule("FREQ=YEARLY;INTERVAL=-1", "FREQ=YEARLY"));
		TEST_RULES.add(new InvalidTestRule("FREQ=DAILY;BYWEEKNO=1,5,8", "FREQ=YEARLY;BYWEEKNO=1,5,8"));
		TEST_RULES.add(new InvalidTestRule("FREQ=MONTHLY;UNTIL=20120924T215959ZZ", "FREQ=MONTHLY;UNTIL=20120924T215959Z"));
	}

	private static class InvalidTestRule
	{
		public final String mInvalidRule;
		public final String mExpectedResult;


		public InvalidTestRule(String invalidRule, String expectedResult)
		{
			mInvalidRule = invalidRule;
			mExpectedResult = expectedResult;
		}


		public void testLaxMode()
		{
			if (mExpectedResult != null)
			{
				try
				{
					assertEquals(mExpectedResult, new RecurrenceRule(mInvalidRule, RfcMode.RFC5545_LAX).toString());