public void ShouldNotExecuteWhenForEventsNotInterestedIn( Subject<IEvent> source, FakeDocumentWriter writer, NotInterestedInThis @event) { writer.DB.Clear(); new DocumentWriterProjection<ListOfProjectedState>( source, writer, () => new ListOfProjectedState()) .When<TestEvent>((e, s) => s.AddState( new TestProjectionState(e.SomeState)), e => e.Id); source.OnNext(@event); writer.DB.Select(x => x.Value).ShouldBeEmpty(); }
public void ShouldNotExecuteWhenForEventsNotInterestedIn( Subject <IEvent> source, FakeDocumentWriter writer, NotInterestedInThis @event) { writer.DB.Clear(); new DocumentWriterProjection <ListOfProjectedState>( source, writer, () => new ListOfProjectedState()) .When <TestEvent>((e, s) => s.AddState( new TestProjectionState(e.SomeState)), e => e.Id); source.OnNext(@event); writer.DB.Select(x => x.Value).ShouldBeEmpty(); }