public void AddAppointmentTest() { var storage = MockRepository.GenerateMock <IStorage>(); storage.Expect(s => s.CreateAppointment(appointment.Title, appointment.StartTime, appointment.EndTime)).Return(appointment); storage.Stub(s => s.CreateAttendance(appointment, null)).Return(null); storage.Replay(); var storageStore = new StorageStore(storage); storageStore.AddAppointment(appointment); storage.VerifyAllExpectations(); }