public void Cannot_pass_null_instance_of_EventPublisher() { var transaction = Mock.Of <ITransaction>(); var eventStore = Mock.Of <IEventStore>(); var snapshotStore = Mock.Of <ISnapshotStore>(); var eventUpdateManager = Mock.Of <IEventUpdateManager>(); var metadataProviders = Mock.Of <IEnumerable <IMetadataProvider> >(); Action act = () => new Session(MockHelper.CreateLoggerFactory(MockHelper.GetMockLogger().Object), transaction, eventStore, snapshotStore, null, eventUpdateManager, metadataProviders); act.ShouldThrowExactly <ArgumentNullException>(); }