コード例 #1
0
        public PurchaseServiceTests()
        {
            _fakeAccountRepository = new FakeRepository<Account>();
            _fakeOrderRepository = new FakeRepository<Order>();
            _fakeProductRepository = new FakeRepository<Product>();

            _fakeUnitOfWorkFactory = new FakeUnitOfWorkFactory(
                uow =>
                {
                    uow.SetRepository(_fakeAccountRepository);
                    uow.SetRepository(_fakeOrderRepository);
                    uow.SetRepository(_fakeProductRepository);
                });
        }
コード例 #2
0
        public CashboxCalculatuinDiscountSteps()
        {
            _fakeAccountRepository = new FakeRepository<Account>();
            _fakeOrderRepository = new FakeRepository<Order>();
            _fakeProductRepository = new FakeRepository<Product>();

            _fakeUnitOfWorkFactory = new FakeUnitOfWorkFactory(
                uow =>
                {
                    uow.SetRepository(_fakeAccountRepository);
                    uow.SetRepository(_fakeOrderRepository);
                    uow.SetRepository(_fakeProductRepository);
                });
            _service = new PurchaseService(_fakeUnitOfWorkFactory);
            TestSetup();
        }