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);
        }
        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 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);
        }