public SearchItemFacadeTest() 
        {
            _itemMapper = new ItemMapper();

            _fixture = new Fixture();
            _fixture.Behaviors.Remove(new ThrowingRecursionBehavior());
            _fixture.Behaviors.Add(new OmitOnRecursionBehavior());
            _fixture.Customizations.Add(new TypeRelay(typeof(Item), typeof(Book)));
            _fixture.Customizations.Add(new TypeRelay(typeof(ItemBusinessModel), typeof(BookBusinessModel)));

            _readerBusinessModel = _fixture.Create<ReaderBusinessModel>();
            ReaderMapper readerMapper = new ReaderMapper();
            _reader = readerMapper.Map(_readerBusinessModel);

            _item = _fixture.Create<Item>();
            _itemBusinessModel = _itemMapper.Map(_item);

            _tag = _fixture.Create<Tag>();

            this.uow = Initializer.GetLibraryUow();

            uow.Readers.Add(this._reader);
            uow.Items.Add(this._item);
            uow.Tags.Add(_tag);
            this._searchItemFacade = new SearchItemFacade(uow);
        }
        public ScannedPageFacadeTest() 
        {
            _scannedPageMapper = new ScannedPageMapper();

            _fixture = new Fixture();
            _fixture.Behaviors.Remove(new ThrowingRecursionBehavior());
            _fixture.Behaviors.Add(new OmitOnRecursionBehavior());
            _fixture.Customizations.Add(new TypeRelay(typeof(Item), typeof(Book)));
            _fixture.Customizations.Add(new TypeRelay(typeof(ItemBusinessModel), typeof(BookBusinessModel)));

            _scannedPage = _fixture.Create<ScannedPage>();
            _scannedPageBusinessModel = _fixture.Create<ScannedPageBusinessModel>();

            _readerBusinessModel = _fixture.Create<ReaderBusinessModel>();
            ReaderMapper readerMapper = new ReaderMapper();
            _reader = readerMapper.Map(_readerBusinessModel);

            _itemBusinessModel = _fixture.Create<ItemBusinessModel>();
            ItemMapper itemMapper = new ItemMapper();
            _item = itemMapper.Map(_itemBusinessModel);

            this.uow = Initializer.GetLibraryUow();
            uow.ScannedPages.Add(this._scannedPage);
            uow.Readers.Add(this._reader);
            uow.Items.Add(this._item);
            this._scannedPageFacade = new ScannedPageFacade(uow);
        }
Beispiel #3
0
        public TagScoresFacadeTests()
        {
            this.uow = Initializer.GetLibraryUow();

            Fixture fixture = new Fixture {
                RepeatCount = 1
            };

            fixture.Behaviors.Remove(new ThrowingRecursionBehavior());
            fixture.Behaviors.Add(new OmitOnRecursionBehavior());
            fixture.Customizations.Add(new TypeRelay(typeof(Item), typeof(Book)));
            this.item   = fixture.Create <Item>();
            this.reader = fixture.Create <Reader>();
            this.score  = new TagScore {
                Id = 1, Item = this.item, Reader = this.reader, Score = 0.5f
            };
            var i = fixture.Create <Item>();

            this.newScore = new TagScore {
                Id = 2, Item = i, Reader = this.reader, Score = 0.7f
            };
            this.uow.TagScores.Add(this.score);
            this.uow.Readers.Add(this.reader);
            this.uow.Items.Add(this.item); this.uow.Items.Add(i);

            this.tagScoresFacade = new TagScoresFacade(this.uow);
        }
Beispiel #4
0
        public TagsFacadeTests()
        {
            var reader = new Reader {
                ReaderId = 1, FirstName = "firstName", LastName = "lastName", Preferences = new List <Tag>()
            };

            this.uow      = Initializer.GetLibraryUow();
            this.tagToAdd = new Tag {
                Id = 1, Items = null, Readers = new List <Reader>(), Name = "tag"
            };
            this.tagToAdd.Readers.Add(reader);
            reader.Preferences.Add(this.tagToAdd);
            this.uow.Tags.Add(this.tagToAdd);
            var tag = new Tag {
                Id = 2, Items = null, Readers = null, Name = "test"
            };

            this.uow.Tags.Add(tag);
            tag = new Tag {
                Id = 3, Items = null, Readers = null, Name = "tag1"
            };
            this.uow.Tags.Add(tag);
            tag = new Tag {
                Id = 4, Items = null, Readers = null, Name = "test1"
            };
            this.uow.Tags.Add(tag);
            this.uow.Readers.Add(reader);
            this.tagsFacade = new TagsFacade(this.uow);
        }
Beispiel #5
0
        public ScannedPageFacadeTest()
        {
            _scannedPageMapper = new ScannedPageMapper();

            _fixture = new Fixture();
            _fixture.Behaviors.Remove(new ThrowingRecursionBehavior());
            _fixture.Behaviors.Add(new OmitOnRecursionBehavior());
            _fixture.Customizations.Add(new TypeRelay(typeof(Item), typeof(Book)));
            _fixture.Customizations.Add(new TypeRelay(typeof(ItemBusinessModel), typeof(BookBusinessModel)));

            _scannedPage = _fixture.Create <ScannedPage>();
            _scannedPageBusinessModel = _fixture.Create <ScannedPageBusinessModel>();

            _readerBusinessModel = _fixture.Create <ReaderBusinessModel>();
            ReaderMapper readerMapper = new ReaderMapper();

            _reader = readerMapper.Map(_readerBusinessModel);

            _itemBusinessModel = _fixture.Create <ItemBusinessModel>();
            ItemMapper itemMapper = new ItemMapper();

            _item = itemMapper.Map(_itemBusinessModel);

            this.uow = Initializer.GetLibraryUow();
            uow.ScannedPages.Add(this._scannedPage);
            uow.Readers.Add(this._reader);
            uow.Items.Add(this._item);
            this._scannedPageFacade = new ScannedPageFacade(uow);
        }
Beispiel #6
0
        public SearchItemFacadeTest()
        {
            _itemMapper = new ItemMapper();

            _fixture = new Fixture();
            _fixture.Behaviors.Remove(new ThrowingRecursionBehavior());
            _fixture.Behaviors.Add(new OmitOnRecursionBehavior());
            _fixture.Customizations.Add(new TypeRelay(typeof(Item), typeof(Book)));
            _fixture.Customizations.Add(new TypeRelay(typeof(ItemBusinessModel), typeof(BookBusinessModel)));

            _readerBusinessModel = _fixture.Create <ReaderBusinessModel>();
            ReaderMapper readerMapper = new ReaderMapper();

            _reader = readerMapper.Map(_readerBusinessModel);

            _item = _fixture.Create <Item>();
            _itemBusinessModel = _itemMapper.Map(_item);

            _tag = _fixture.Create <Tag>();

            this.uow = Initializer.GetLibraryUow();

            uow.Readers.Add(this._reader);
            uow.Items.Add(this._item);
            uow.Tags.Add(_tag);
            this._searchItemFacade = new SearchItemFacade(uow);
        }
        public ReservedItemFacadeTests()
        {
            this.fixture = new Fixture();
            this.fixture.Behaviors.Remove(new ThrowingRecursionBehavior());
            this.fixture.Behaviors.Add(new OmitOnRecursionBehavior());
            this.fixture.Customizations.Add(new TypeRelay(typeof(Item), typeof(Book)));

            this.testItem = this.fixture.Create<Item>();
            this.testResItem = this.fixture.Create<ReservedItem>();

            this.testResItem.Item = this.testItem;

            this.uow = Initializer.GetLibraryUow();

            this.uow.Items.Add(this.testItem);
            this.uow.ReservedItems.Add(this.testResItem);
            this.resItemsFacade = new ReservedItemsFacade(this.uow);
        }
        public TagsFacadeTests()
        {
            var reader = new Reader {ReaderId = 1, FirstName = "firstName", LastName = "lastName", Preferences = new List<Tag>()};

            this.uow = Initializer.GetLibraryUow();
            this.tagToAdd = new Tag {Id = 1, Items = null, Readers = new List<Reader>(), Name = "tag"};
            this.tagToAdd.Readers.Add(reader);
            reader.Preferences.Add(this.tagToAdd);
            this.uow.Tags.Add(this.tagToAdd);
            var tag = new Tag { Id = 2, Items = null, Readers = null, Name = "test" };
            this.uow.Tags.Add(tag);
            tag = new Tag { Id = 3, Items = null, Readers = null, Name = "tag1" };
            this.uow.Tags.Add(tag);
            tag = new Tag { Id = 4, Items = null, Readers = null, Name = "test1" };
            this.uow.Tags.Add(tag);
            this.uow.Readers.Add(reader);
            this.tagsFacade = new TagsFacade(this.uow);
        }
Beispiel #9
0
        public ReservedItemFacadeTests()
        {
            this.fixture = new Fixture();
            this.fixture.Behaviors.Remove(new ThrowingRecursionBehavior());
            this.fixture.Behaviors.Add(new OmitOnRecursionBehavior());
            this.fixture.Customizations.Add(new TypeRelay(typeof(Item), typeof(Book)));

            this.testItem    = this.fixture.Create <Item>();
            this.testResItem = this.fixture.Create <ReservedItem>();

            this.testResItem.Item = this.testItem;

            this.uow = Initializer.GetLibraryUow();

            this.uow.Items.Add(this.testItem);
            this.uow.ReservedItems.Add(this.testResItem);
            this.resItemsFacade = new ReservedItemsFacade(this.uow);
        }
        public TagScoresFacadeTests()
        {
            this.uow = Initializer.GetLibraryUow();

            Fixture fixture = new Fixture{RepeatCount = 1};
            fixture.Behaviors.Remove(new ThrowingRecursionBehavior());
            fixture.Behaviors.Add(new OmitOnRecursionBehavior());
            fixture.Customizations.Add(new TypeRelay(typeof(Item), typeof(Book)));
            this.item = fixture.Create<Item>();
            this.reader = fixture.Create<Reader>();
            this.score = new TagScore { Id = 1, Item = this.item, Reader = this.reader, Score = 0.5f };
            var i = fixture.Create<Item>();
            this.newScore = new TagScore { Id = 2, Item = i, Reader = this.reader, Score = 0.7f };
            this.uow.TagScores.Add(this.score);
            this.uow.Readers.Add(this.reader);
            this.uow.Items.Add(this.item);this.uow.Items.Add(i);

            this.tagScoresFacade = new TagScoresFacade(this.uow);
        }
 public ReaderHistoryManager(ILibraryUow uow, IReaderHistoryFacade readerHistoryFacade)
 {
     this.uow = uow;
     this.readerHistoryFacade = readerHistoryFacade;
 }
Beispiel #12
0
 public ScannedPageFacade(ILibraryUow uow)
 {
     this.uow           = uow;
     _scannedPageMapper = new ScannedPageMapper();
 }
Beispiel #13
0
 public UsersFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
 public SearchBookManager(ILibraryUow uow, ISearchBookFacade searchBookFacade)
 {
     this.uow = uow;
     this.searchBookFacade = searchBookFacade;
 }
Beispiel #15
0
 public UsersFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
 public ReaderHistoryManager(ILibraryUow uow, IReaderHistoryFacade readerHistoryFacade)
 {
     this.uow = uow;
     this.readerHistoryFacade = readerHistoryFacade;
 }
 public MagazineFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
 public ReaderManager(ILibraryUow uow, IReaderFacade readerFacade, IUsersFacade usersFacade)
 {
     this.uow = uow;
     this.readerFacade = readerFacade;
     this.usersFacade = usersFacade;
 }
Beispiel #19
0
 public TagsFacade(ILibraryUow libraryUow)
 {
     this.libraryUow = libraryUow;
 }
Beispiel #20
0
 public ItemFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
 public BookWithAuthorsShortFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
Beispiel #22
0
 public TagScoresFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
Beispiel #23
0
 public DiskFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
Beispiel #24
0
 public BookAuthorFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
Beispiel #25
0
 public AuthorFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
 public BookWithAuthorsShortFacade(ILibraryUow uow)
 {
     this.uow = uow;
     
 }
Beispiel #27
0
 public ReservedItemsFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
 public ReaderHistoryFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
 public SearchBookFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
 public ScannedPageManager(ILibraryUow uow, IScannedPageFacade searchBookFacade)
 {
     this.uow = uow;
     this.scannedPageFacade = searchBookFacade;
 }
 public SearchBookFacade()
 {
     this.uow = new LibraryUow();
 }
 public SearchBookManager()
 {
     this.uow = new LibraryUow();
     this.searchBookFacade = new SearchBookFacade();
 }
 public InventoryFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
Beispiel #34
0
 public InventoryFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
 public ReservedBooksFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
Beispiel #36
0
 public DiskFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
 public TagScoresFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
Beispiel #38
0
 public UserManager(ILibraryUow uow, IUsersFacade usersFacade, IReaderManager readerManager)
 {
     this.uow = uow;
     this.readerManager = readerManager;
     this.usersFacade = usersFacade;
 }
 public ReservedBooksFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
Beispiel #40
0
 public SearchBookFacade()
 {
     this.uow = new LibraryUow();
 }
Beispiel #41
0
 public UserManager(ILibraryUow uow, IUsersFacade usersFacade, IReaderManager readerManager)
 {
     this.uow           = uow;
     this.readerManager = readerManager;
     this.usersFacade   = usersFacade;
 }
 public SearchItemFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
 public ScannedPageManager(ILibraryUow uow, IScannedPageFacade searchBookFacade)
 {
     this.uow = uow;
     this.scannedPageFacade = searchBookFacade;
 }
Beispiel #44
0
 public TagsFacade(ILibraryUow libraryUow)
 {
     this.libraryUow = libraryUow;
 }
 public ReservedItemsFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
Beispiel #46
0
 public SearchBookFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
Beispiel #47
0
 public MagazineFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
Beispiel #48
0
 public ReaderHistoryFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
Beispiel #49
0
 public ReaderManager(ILibraryUow uow, IReaderFacade readerFacade, IUsersFacade usersFacade)
 {
     this.uow          = uow;
     this.readerFacade = readerFacade;
     this.usersFacade  = usersFacade;
 }
Beispiel #50
0
 public SearchBookManager(ILibraryUow uow, ISearchBookFacade searchBookFacade)
 {
     this.uow = uow;
     this.searchBookFacade = searchBookFacade;
 }
 public ConsignmentFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
Beispiel #52
0
 public ReaderFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
Beispiel #53
0
 public SearchBookManager()
 {
     this.uow = new LibraryUow();
     this.searchBookFacade = new SearchBookFacade();
 }
Beispiel #54
0
 public ReaderFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }
 public ConsignmentFacade(ILibraryUow uow)
 {
     this.uow = uow;
 }