예제 #1
0
        public void SetUp()
        {
            this.writeEventService = Substitute.For<IWriteEventService>();
            this.writeToReadRepository = Substitute.For<IWriteToReadRepository>();

            SystemTime.Set(new DateTime(2015, 9, 4, 19, 48, 11));
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WriteToReadService"/> class.
        /// </summary>
        public WriteToReadService(IWriteEventService writeEventService, IWriteToReadRepository writeToReadRepository)
        {
            if (writeEventService == null)
            {
                throw new ArgumentNullException(nameof(writeEventService));
            }

            if (writeToReadRepository == null)
            {
                throw new ArgumentNullException(nameof(writeToReadRepository));
            }

            this.writeEventService = writeEventService;
            this.writeToReadRepository = writeToReadRepository;
        }