protected void GivenThereAreNoProjections() { ProjectId = DataFixture.Create <Guid>(); ToggleKey = DataFixture.Create <string>(); ProjectionStore.WhenForAnyArgs(ps => ps.Get(Arg.Any <string>())) .Do(ci => throw new Evelyn.Core.ReadModel.ProjectionNotFoundException()); }
protected ProjectionBuilderHarness() { DataFixture = new Fixture(); StoppingToken = default; ProjectionStore = Substitute.For <IProjectionStore <TProjection> >(); _deserializeWithPrivateSetters = new JsonSerializerSettings { ContractResolver = new JsonPrivateResolver() }; ProjectionStore.Get(Arg.Any <string>()) .Returns(ps => CopyOf(OriginalProjection)); ProjectionStore.WhenForAnyArgs(ps => ps.Create(Arg.Any <string>(), Arg.Any <TProjection>())) .Do(ci => UpdatedProjection = ci.ArgAt <TProjection>(1)); ProjectionStore.WhenForAnyArgs(ps => ps.Update(Arg.Any <string>(), Arg.Any <TProjection>())) .Do(ci => UpdatedProjection = ci.ArgAt <TProjection>(1)); StreamPosition = long.MinValue; }