public void ScenarioOkay01TestAsync() { // arrange Reservation reservation = new Reservation { KundeId = 1, AutoId = 1, Von = new DateTime(2020, 10, 04), Bis = new DateTime(2020, 11, 19), }; // act bool result = _target.CheckDateRange(reservation); // assert Assert.True(result); }
public void ScenarioOkay02Test_MoreThan24Hours() { var reservation = new Reservation { AutoId = 1, KundeId = 1, From = BaseDate, To = MoreThan24h }; ReservationManager.CheckDateRange(reservation); }
public void ScenarioNotOkay03Test_MoreThan24Hours_FromToInverted() { var reservation = new Reservation { AutoId = 1, KundeId = 1, From = MoreThan24h, To = BaseDate }; Action a = () => ReservationManager.CheckDateRange(reservation); Assert.Throws <InvalidDateRangeException>(a); }
public void ScenarioNotOkay01Test_LessThan24Hours() { var reservation = new Reservation { AutoId = 1, KundeId = 1, From = BaseDate, To = LessThan24h }; Action a = () => ReservationManager.CheckDateRange(reservation); Assert.Throws <InvalidDateRangeException>(a); }