public void ThrowsIfReadModelSubscribesSameEventTwice() { Action a = () => { var _ = new SingleAggregateReadStoreManager <ThingyAggregate, ThingyId, InMemoryReadStore <ReadModelWithAmbigiousEvents>, ReadModelWithAmbigiousEvents>(null, null, null, null, null, null); }; a.Should().Throw <TypeInitializationException>().WithInnerException <Exception>().WithMessage("*implements ambiguous*"); }
public void ThrowsIfReadModelSubscribesNoEvents() { Action a = () => { var _ = new SingleAggregateReadStoreManager <ThingyAggregate, ThingyId, InMemoryReadStore <ReadModelWithoutEvents>, ReadModelWithoutEvents>(null, null, null, null, null, null); }; a.Should().Throw <TypeInitializationException>().WithInnerException <Exception>().WithMessage("*does not implement any*"); }