public void Handle(ParameterIdentificationIntermediateResultsUpdatedEvent eventToHandle) { if (!canHandle(eventToHandle)) { return; } if (!canRefresh) { return; } updateFeedback(eventToHandle.State); }
protected override void Context() { base.Context(); _parameterIdentificationRun = A.Fake <IParameterIdentificationRun>(); _parameterIdentificationsRuns = new List <IParameterIdentificationRun> { _parameterIdentificationRun }; A.CallTo(() => _parameterIdentificationRunFactory.CreateFor(_parameterIdentification, A <CancellationToken> ._)).Returns(_parameterIdentificationsRuns); _runState = A.Fake <ParameterIdentificationRunState>(); A.CallTo(() => _eventPublisher.PublishEvent(A <ParameterIdentificationIntermediateResultsUpdatedEvent> ._)) .Invokes(x => _event = x.GetArgument <ParameterIdentificationIntermediateResultsUpdatedEvent>(0)); sut.StartAsync(_parameterIdentification).Wait(); }