示例#1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        FindBook findBook = new FindBook();
        string   url      = findBook.GetImageUrl(Request.QueryString["isbn"]);

        Response.Redirect(url);
    }
示例#2
0
        public WhenFindBookQueryHandlerCalled()
        {
            _googleApiServiceMock  = new Mock <IBooksInformationService>();
            _ksiazkiOrgApiService  = new Mock <IBooksInformationService>();
            _libraryRepositoryMock = new Mock <ILibraryRepository>();
            var bookServices = new List <IBooksInformationService> {
                _googleApiServiceMock.Object, _ksiazkiOrgApiService.Object
            };

            _findBook = new FindBook(_libraryRepositoryMock.Object, bookServices);
        }
        /// <summary>
        /// Find book with defined comparer
        /// </summary>
        public List <Book> FindByTag(FindBook Compare, object criteria)
        {
            var result = new List <Book>();

            _bookList.ForEach(delegate(Book book) {
                if (Compare(book, criteria))
                {
                    result.Add(book);
                }
            });
            return(result);
        }
示例#4
0
    protected void Page_Load(object sender, EventArgs e)
    {
		FindBook findBook = new FindBook();
		Response.Redirect(findBook.GetImageUrl(Request.QueryString["isbn"]));
    }