public async Task StartDateAfterEnd() { EventViewModel event1 = new EventViewModel("", new DateTime(2020, 3, 1), new DateTime(2019, 3, 1)); await controller.Create(event1); Assert.IsFalse(controller.ModelState.IsValid); }
public void TestCreateCalendar() { //Arrange CalendarController calendarController = new CalendarController(); //Act Calendar testCalendar = new Calendar(99); calendarController.Create(testCalendar); //Assert Calendar calendar = calendarController.Get(99); Assert.AreEqual(calendar.UserId, testCalendar.UserId); }
public void Create(Calendar calendar) { calendarController.Create(calendar); }