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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public void Create(Calendar calendar)
 {
     calendarController.Create(calendar);
 }