public void Assure_start_and_end_date_can_be_set() { var spec = new HolidaySpecification(); spec.StartDate = new DateTime(2010,10,10); spec.EndDate = new DateTime(2010,11,11); spec.StartDate.ShouldBe(new DateTime(2010, 10, 10)); spec.EndDate.ShouldBe(new DateTime(2010,11,11)); }
public void Assure_invalid_startDate_does_not_change_the_startDate() { var spec = new HolidaySpecification(); try { spec.EndDate = new DateTime(2010, 10, 10); spec.StartDate = new DateTime(2010, 11, 11); } catch (ArgumentException expected) { } spec.StartDate.ShouldNotBe(new DateTime(2010, 11, 11)); }
public void Not_setting_startDate_and_endDate_throws_argument_exception() { var spec = new HolidaySpecification(); dbRepo.Get(spec); }
public void Setting_endDate_to_a_date_earlier_than_startDate_throws_argumentException() { var spec = new HolidaySpecification(); spec.StartDate = new DateTime(2010, 11, 11); spec.EndDate = new DateTime(2010, 10, 10); }