Exemple #1
0
        public FailedWhenDeterminateReturnDateWasExpired()
        {
            var db = new EFInMemoryDatabase();

            _context = db.CreateDataContext <EFDataContext>();
            var repository       = new EFEntrustRepository(_context);
            var unitOfWork       = new EFUnitOfWork(_context);
            var bookRepository   = new EFBookRepository(_context);
            var memberRepository = new EFMemberRepository(_context);

            _sut = new EntrustAppService(repository, unitOfWork, bookRepository, memberRepository);
        }
Exemple #2
0
        public Successful()
        {
            var db = new EFInMemoryDatabase();

            _context     = db.CreateDataContext <EFDataContext>();
            _readContext = db.CreateDataContext <EFDataContext>();
            var repository       = new EFEntrustRepository(_context);
            var unitOfWork       = new EFUnitOfWork(_context);
            var bookRepository   = new EFBookRepository(_context);
            var memberRepository = new EFMemberRepository(_context);

            _sut = new EntrustAppService(repository, unitOfWork, bookRepository, memberRepository);
        }
        public FailedWhenMemberAgeIsNotInRangeException()
        {
            var db = new EFInMemoryDatabase();

            _context     = db.CreateDataContext <EFDataContext>();
            _readContext = db.CreateDataContext <EFDataContext>();
            var repository       = new EFEntrustRepository(_context);
            var unitOfWork       = new EFUnitOfWork(_context);
            var bookRepository   = new EFBookRepository(_context);
            var memberRepository = new EFMemberRepository(_context);

            _sut = new EntrustAppService(repository, unitOfWork, bookRepository, memberRepository);
        }
        public EntrustServiceTests()
        {
            var db = new EFInMemoryDatabase();

            _context     = db.CreateDataContext <EFDataContext>();
            _readContext = db.CreateDataContext <EFDataContext>();
            var repository       = new EFEntrustRepository(_context);
            var unitOfWork       = new EFUnitOfWork(_context);
            var bookRepository   = new EFBookRepository(_context);
            var memberRepository = new EFMemberRepository(_context);

            _sut      = new EntrustAppService(repository, unitOfWork, bookRepository, memberRepository);
            _category = BookCategoryFactory.GenerateBookCategory("dummy-title");
        }
 public EntrustController(EntrustService entrustService)
 {
     _entrustService = entrustService;
 }