}
public void testByWeekNoGenerator() throws Exception {
Generator g = Generators.byWeekNoGenerator(
new int[] { 22 }, Weekday.SU, IcalParseUtil.parseDateValue("20060101"));
runGeneratorTests(g, new DTBuilder(2006, 1, 1), "day", "");
runGeneratorTests(g, new DTBuilder(2006, 2, 1), "day", "");
runGeneratorTests(g, new DTBuilder(2006, 3, 1), "day", "");
runGeneratorTests(g, new DTBuilder(2006, 4, 1), "day", "");
runGeneratorTests(g, new DTBuilder(2006, 5, 1), "day", "28, 29, 30, 31");
runGeneratorTests(g, new DTBuilder(2006, 6, 1), "day", "1, 2, 3");
runGeneratorTests(g, new DTBuilder(2006, 7, 1), "day", "");
// weekstart of monday shifts each week forward by one
Generator g2 = Generators.byWeekNoGenerator(
new int[] { 22 }, Weekday.MO, IcalParseUtil.parseDateValue("20060101"));
runGeneratorTests(g2, new DTBuilder(2006, 1, 1), "day", "");
runGeneratorTests(g2, new DTBuilder(2006, 2, 1), "day", "");
runGeneratorTests(g2, new DTBuilder(2006, 3, 1), "day", "");
runGeneratorTests(g2, new DTBuilder(2006, 4, 1), "day", "");
runGeneratorTests(g2, new DTBuilder(2006, 5, 1), "day", "29, 30, 31");
runGeneratorTests(g2, new DTBuilder(2006, 6, 1), "day", "1, 2, 3, 4");
runGeneratorTests(g2, new DTBuilder(2006, 7, 1), "day", "");
// 2004 with a week start of monday has no orphaned days.
// 2004-01-01 falls on Thursday
Generator g3 = Generators.byWeekNoGenerator(
new int[] { 14 }, Weekday.MO, IcalParseUtil.parseDateValue("20040101"));
runGeneratorTests(g3, new DTBuilder(2004, 1, 1), "day", "");
runGeneratorTests(g3, new DTBuilder(2004, 2, 1), "day", "");
runGeneratorTests(g3, new DTBuilder(2004, 3, 1), "day", "29, 30, 31");
runGeneratorTests(g3, new DTBuilder(2004, 4, 1), "day", "1, 2, 3, 4");
runGeneratorTests(g3, new DTBuilder(2004, 5, 1), "day", "");
}