public void testGermanyXetra() { List<Date> expectedHol = new List<Date>(); expectedHol.Add(new Date(1,Month.January,2003)); expectedHol.Add(new Date(18,Month.April,2003)); expectedHol.Add(new Date(21,Month.April,2003)); expectedHol.Add(new Date(1,Month.May,2003)); expectedHol.Add(new Date(24,Month.December,2003)); expectedHol.Add(new Date(25,Month.December,2003)); expectedHol.Add(new Date(26,Month.December,2003)); expectedHol.Add(new Date(31,Month.December,2003)); expectedHol.Add(new Date(1,Month.January,2004)); expectedHol.Add(new Date(9,Month.April,2004)); expectedHol.Add(new Date(12,Month.April,2004)); expectedHol.Add(new Date(24,Month.December,2004)); expectedHol.Add(new Date(31,Month.December,2004)); Calendar c = new Germany(Germany.Market.Xetra); List<Date> hol = Calendar.holidayList(c, new Date(1,Month.January,2003), new Date(31,Month.December,2004)); for (int i=0; i<Math.Min(hol.Count, expectedHol.Count); i++) { if (hol[i]!=expectedHol[i]) Assert.Fail("expected holiday was " + expectedHol[i] + " while calculated holiday is " + hol[i]); } if (hol.Count!=expectedHol.Count) Assert.Fail("there were " + expectedHol.Count + " expected holidays, while there are " + hol.Count + " calculated holidays"); }