public void GivenIHaveAnInstanceOfActivityService() { _mockActivityRepository = Mock.Create <IActRepository>(Behavior.Strict); Mock.Arrange(() => _mockActivityRepository.Save(Arg.IsAny <Act>())); _activityService = new ActLoggerService(_mockActivityRepository); _activityService.Logged += delegate(object sender, ActLoggedEventArgs e) { _actRaisedInEvent = e.Act; }; }
public void LogAct(Act _act) { _actRepository.Save(_act); OnActLogged(new ActLoggedEventArgs(_act)); }