public void SaveChangeEventInfoTest() { List <Appointment> events = new List <Appointment>(); Appointment eventMock = new Appointment { Title = "New", StartTime = DateTime.ParseExact("11-01-2000 10:00", "dd-MM-yyyy hh:mm", CultureInfo.InvariantCulture), EndTime = DateTime.ParseExact("11-01-2000 12:00", "dd-MM-yyyy hh:mm", CultureInfo.InvariantCulture) }; var day = new Day(DateTime.ParseExact("11-01-2000", "dd-MM-yyyy", CultureInfo.InvariantCulture)); day.AppointmentsList.Add(eventMock); calendarMock.Expect(dao => dao.AllDays.Add(day)); vm.MyAppointment = eventMock; vm.OldEvent = true; vm.NewTitle = "Newer"; vm.SaveCommand.Execute(new EventSettings()); calendarMock.Expect(dao => dao.AllDays[0].AppointmentsList[0].Title).Equals("Newer"); Assert.AreEqual("Newer", vm.CalendarModel.AllDays[0].AppointmentsList[0].Title); }