public void SetUp() { _event = null; _eventsRepositoryMock = new Mock <IEventRepository>(); _eventsRepositoryMock.Setup(h => h.Save(It.IsAny <Event>())) .Callback <Event>(r => _event = r); var factory = new SchedulerFactory(); _scheduler = factory.CreateInstance(WeeklySchedulerTypeName); }