ints = Util.uniquify(ints);
assertEquals("0,1,2,3,4,7,8", arrToString(ints));
}
public void testRollToNextWeekStart() throws Exception {
DTBuilder builder;
builder = new DTBuilder(2006, 1, 23);
Util.rollToNextWeekStart(builder, Weekday.TU);
assertEquals("20060124", builder.toDate().toString());
builder = new DTBuilder(2006, 1, 24);
Util.rollToNextWeekStart(builder, Weekday.TU);
assertEquals("20060124", builder.toDate().toString());
builder = new DTBuilder(2006, 1, 25);
Util.rollToNextWeekStart(builder, Weekday.TU);
assertEquals("20060131", builder.toDate().toString());
builder = new DTBuilder(2006, 1, 23);
Util.rollToNextWeekStart(builder, Weekday.MO);
assertEquals("20060123", builder.toDate().toString());
builder = new DTBuilder(2006, 1, 24);
Util.rollToNextWeekStart(builder, Weekday.MO);
assertEquals("20060130", builder.toDate().toString());
builder = new DTBuilder(2006, 1, 25);
Util.rollToNextWeekStart(builder, Weekday.MO);
assertEquals("20060130", builder.toDate().toString());
builder = new DTBuilder(2006, 1, 31);
Util.rollToNextWeekStart(builder, Weekday.MO);
assertEquals("20060206", builder.toDate().toString());
}