Пример #1
0
        public FakeUserRepository(FakeEventStore eventStoreStub)
        {
            if (eventStoreStub == null)
            {
                throw new ArgumentNullException(nameof(eventStoreStub));
            }

            _eventStoreStub = eventStoreStub;
        }
        private void before_each()
        {
            var fakeEventStore = new FakeEventStore();
            var fakeUserRegistrationProcessRepository = new FakeUserRegistrationProcessRepository(fakeEventStore);

            _sut = new UserRegistrationCommandService(fakeUserRegistrationProcessRepository);

            _eventStore = fakeEventStore;
        }
Пример #3
0
        private void before_each()
        {
            var userByEmailIndexStub = new UserByEmailIndexStub();

            var fakeEventStore = new FakeEventStore();
            var fakeUserRegistrationProcessRepository = new FakeUserRegistrationProcessRepository(fakeEventStore);
            var fakeUserRepository = new FakeUserRepository(fakeEventStore);

            _sut = new UserRegistrationEventHandler(
                fakeUserRegistrationProcessRepository,
                fakeUserRepository,
                userByEmailIndexStub);

            _userRegistrationProcessRepository = fakeUserRegistrationProcessRepository;
            _eventStore       = fakeEventStore;
            _userByEmailIndex = userByEmailIndexStub;
        }