public async Task When_starting_a_projection_by_name_then_the_user_desired_state_is_updated() { var projectionNameString = "projection-name"; var projections = new RegisteredProjectionsBuilder(_fixture, _registeredProjections) .AddNamedProjection(projectionNameString) .Build(); await _sut.Start(projectionNameString, CancellationToken.None); projections.First().Projection.Verify(x => x.UpdateUserDesiredState(UserDesiredState.Started, It.IsAny <CancellationToken>())); }
public async Task When_starting_a_projection_by_id_then_the_user_desired_state_is_updated() { const string projectionId = "projection-id"; var projections = new RegisteredProjectionsBuilder(_fixture, _registeredProjections) .AddProjectionWithId(projectionId) .Build(); await _sut.Start(projectionId, CancellationToken.None); projections.First().Projection.Verify(x => x.UpdateUserDesiredState(UserDesiredState.Started, It.IsAny <CancellationToken>())); }