protected override void SetUp()
        {
            base.SetUp();

            bookFactory    = NewMock <IBookFactory>();
            dcComicsParser = new DCComicsParser(bookFactory);
        }
 public BookRepository(IBookFactory bookFactory, IAuthorFactory authorFactory)
 {
     this.Books         = new List <IBook>();
     this.BookFactory   = bookFactory;
     this.AuthorFactory = authorFactory;
     this.LoadBooks();
 }
Exemple #3
0
        protected override void SetUp()
        {
            base.SetUp();

            bookFactory  = NewMock <IBookFactory>();
            marvelParser = new MarvelParser(bookFactory);
        }
Exemple #4
0
 public BookServiceBase(IBookFactory bookFactory, IBookServices bookServices,
                        IBookRepository repository)
 {
     _factory    = bookFactory;
     _services   = bookServices;
     _repository = repository;
 }
Exemple #5
0
 public BookManager(LibraryContext context, IBookFactory bookFac, IAuthorFactory authorFac, IGenreFactory genreFac, IPublisherFactory publisherFac)
 {
     _context      = context;
     _bookFac      = bookFac;
     _authorFac    = authorFac;
     _genreFac     = genreFac;
     _publisherFac = publisherFac;
 }
Exemple #6
0
 public AddCommand(string commandName, IRepository bookRepository, IBookFactory bookFactory, IAuthorFactory authorFactory, IReader reader, IWriter writer)
     : base(commandName)
 {
     this.BookRepository = bookRepository;
     this.BookFactory    = bookFactory;
     this.AuthorFactory  = authorFactory;
     this.Reader         = reader;
     this.Writer         = writer;
 }
Exemple #7
0
 public BookIndexBuilder(
     IBookIndex bookIndex,
     IBookFactory bookFactory,
     ISpecificBookDataProvider[] specificBookDataProviders)
 {
     this.bookIndex   = bookIndex;
     this.bookFactory = bookFactory;
     this.specificBookDataProviders = specificBookDataProviders;
 }
 public BookRepository(
     BookChestDbContext dbContext,
     IBookFactory bookFactory,
     IBookQueuePublisher bookQueuePublisher)
 {
     _dbContext          = dbContext;
     _bookFactory        = bookFactory;
     _bookQueuePublisher = bookQueuePublisher;
 }
 public BooksController(
     IBookRepository repository,
     IBookFactory bookFactory,
     IIsbnFactory isbnFactory)
 {
     _repository  = repository;
     _bookFactory = bookFactory;
     _isbnFactory = isbnFactory;
 }
Exemple #10
0
        protected override void SetUp()
        {
            base.SetUp();

            bookIndex        = NewMock <IBookIndex>();
            bookFactory      = NewMock <IBookFactory>();
            provider1        = NewMock <ISpecificBookDataProvider>();
            provider2        = NewMock <ISpecificBookDataProvider>();
            bookIndexBuilder = new BookIndexBuilder(bookIndex, bookFactory, new [] { provider1, provider2 });
        }
Exemple #11
0
 public CreateBookCommandHandler(
     ICurrentUser currentUser,
     IAuthorDomainRepository authorRepository,
     IBookDomainRepository bookRepository,
     IBookFactory bookFactory)
 {
     this.currentUser      = currentUser;
     this.authorRepository = authorRepository;
     this.bookRepository   = bookRepository;
     this.bookFactory      = bookFactory;
 }
        public BookService(IRepository <Book> bookRepository, IUnitOfWork unitOfWork, IBookFactory bookFactory)
        {
            if (bookRepository == null)
            {
                throw new ArgumentNullException("Book repository cannot be null!");
            }

            if (bookFactory == null)
            {
                throw new ArgumentNullException("Book factory cannot be null!");
            }

            if (unitOfWork == null)
            {
                throw new ArgumentNullException("Unit of work cannot be null!");
            }

            this.bookRepository = bookRepository;
            this.unitOfWork     = unitOfWork;
            this.bookFactory    = bookFactory;
        }
Exemple #13
0
 public BookMap(IBookFactory bookFactory)
 {
     _bookFactory = bookFactory;
 }
Exemple #14
0
 public DCComicsParser(IBookFactory bookFactory)
 {
     this.bookFactory = bookFactory;
 }
Exemple #15
0
 public MarvelParser(IBookFactory bookFactory)
 {
     this.bookFactory = bookFactory;
 }
Exemple #16
0
 public void Publish(IBookFactory factory)
 {
     factory.MakeBook();
     factory.MakePublisher();
 }
Exemple #17
0
 public AddBookCommand(IBookFactory bookFactory)
 {
     this.bookFactory = bookFactory;
 }
Exemple #18
0
 public BookRemover(IBookFactory bookFactory, IBookServices bookServices,
                    IBookRepository repository) : base(bookFactory, bookServices, repository)
 {
 }
Exemple #19
0
 public BookList(IBookRepository repository, IBookFactory factory)
 {
     _repository = repository;
     _factory    = factory;
 }
 public BookFactoryTests()
 {
     this.bookFactory = new BookFactory();
 }