KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > cruisecontrol > util > PerDayScheduleItemTest


1 package net.sourceforge.cruisecontrol.util;
2
3 import java.util.Calendar JavaDoc;
4
5 import junit.framework.TestCase;
6
7 public class PerDayScheduleItemTest extends TestCase {
8
9     public void testSetDayShouldMapEnglishNamesToCalendarIntValues() {
10         PerDayScheduleItem item = new PerDayScheduleItem();
11         assertEquals(PerDayScheduleItem.NOT_SET, item.getDay());
12         item.setDay("Sunday");
13         assertEquals(Calendar.SUNDAY, item.getDay());
14         item.setDay("saturday");
15         assertEquals(Calendar.SATURDAY, item.getDay());
16         item.setDay("foo");
17         assertEquals(PerDayScheduleItem.INVALID_NAME_OF_DAY, item.getDay());
18     }
19     
20 }
21
Popular Tags