public async Task Setup()
        {
            BookBuilder.WithLibrary(LibraryId).IsPublic().AddToFavorites(AccountId).Build(25);
            _response = await Client.GetAsync($"/libraries/{LibraryId}/books?pageNumber=2&pageSize=10&favorite=true");

            _assert = new PagingAssert <BookView>(_response);
        }
        public async Task Setup()
        {
            AuthorBuilder.WithLibrary(LibraryId).WithBooks(3).WithoutImage().Build(4);

            _response = await Client.GetAsync($"/libraries/{LibraryId}/authors");

            _assert = new PagingAssert <AuthorView>(_response);
        }
Beispiel #3
0
        public async Task Setup()
        {
            SeriesBuilder.WithLibrary(LibraryId).WithBooks(3).WithNamePattern("SearchSeries").Build(50);

            _response = await Client.GetAsync($"/libraries/{LibraryId}/series?query=SearchSeries&pageNumber=5&pageSize=10");

            _assert = new PagingAssert <SeriesView>(_response);
        }
        public async Task Setup()
        {
            AuthorBuilder.WithLibrary(LibraryId).WithBooks(3).Build(20);

            _response = await Client.GetAsync($"/libraries/{LibraryId}/authors?pageNumber={100}&pageSize={10}");

            _assert = new PagingAssert <AuthorView>(_response);
        }
Beispiel #5
0
        public async Task Setup()
        {
            SeriesBuilder.WithLibrary(LibraryId).WithBooks(3).Build(4);

            _response = await Client.GetAsync($"/libraries/{LibraryId}/series?pageNumber=1&pageSize=10");

            _assert = new PagingAssert <SeriesView>(_response);
        }
        public async Task Setup()
        {
            LibraryBuilder.AssignToUser(AccountId, Role.Writer).StartingWith(_startWith).Build(4);

            _response = await Client.GetAsync($"/libraries?query={_startWith}");

            _assert = new PagingAssert <LibraryView>(_response);
        }
Beispiel #7
0
        public async Task Setup()
        {
            BookBuilder.WithLibrary(LibraryId).HavingSeries().Build(10);

            _response = await Client.GetAsync($"/libraries/{LibraryId}/books");

            _assert = new PagingAssert <BookView>(_response);
        }
        public async Task Setup()
        {
            _books = BookBuilder.WithLibrary(LibraryId).IsPublic().Build(12);

            _response = await Client.GetAsync($"/libraries/{LibraryId}/books?pageNumber=1&pageSize=10&sortby=DateCreated&sort=Ascending");

            _assert = new PagingAssert <BookView>(_response);
        }
Beispiel #9
0
        public async Task Setup()
        {
            var Series = SeriesBuilder.WithLibrary(LibraryId).WithBooks(3).WithoutImage().Build(20);

            _response = await Client.GetAsync($"/libraries/{LibraryId}/series?query={_searchedSeries}");

            _assert = new PagingAssert <SeriesView>(_response);
        }
Beispiel #10
0
        public async Task Setup()
        {
            AuthorBuilder.WithLibrary(LibraryId).WithBooks(3).WithNamePattern("SearchAuthor").Build(5);

            _response = await Client.GetAsync($"/libraries/{LibraryId}/authors?query=SearchAuthor&pageNumber={1}&pageSize={10}");

            _assert = new PagingAssert <AuthorView>(_response);
        }
Beispiel #11
0
        public async Task Setup()
        {
            _book = BookBuilder.WithLibrary(LibraryId).WithPages(9).Build();

            _response = await Client.GetAsync($"/libraries/{LibraryId}/books/{_book.Id}/pages?pageSize=10&pageNumber=1");

            _assert = new PagingAssert <BookPageView>(_response);
        }
        public async Task Setup()
        {
            LibraryBuilder.AssignToUser(AccountId).Build(4);

            _response = await Client.GetAsync($"/libraries");

            _assert = new PagingAssert <LibraryView>(_response);
        }
Beispiel #13
0
        public async Task Setup()
        {
            BookBuilder.WithLibrary(LibraryId).IsPublic().Build(30);

            _response = await Client.GetAsync($"/libraries/{LibraryId}/books?pageNumber=2&pageSize=10");

            _assert = new PagingAssert <BookView>(_response);
        }
        public async Task Setup()
        {
            LibraryBuilder.AssignToUser(AccountId, Role.Writer).Build(15);

            _response = await Client.GetAsync($"/libraries?pageNumber=3&pageSize=5");

            _assert = new PagingAssert <LibraryView>(_response);
        }
        public async Task Setup()
        {
            _author      = AuthorBuilder.WithLibrary(LibraryId).Build();
            _authorBooks = BookBuilder.WithLibrary(LibraryId).WithAuthor(_author).IsPublic().Build(1);
            AuthorBuilder.WithLibrary(LibraryId).WithBooks(3).Build();

            _response = await Client.GetAsync($"/libraries/{LibraryId}/books?pageNumber=20&pageSize=10&authorId={_author.Id}");

            _assert = new PagingAssert <BookView>(_response);
        }
        public async Task Setup()
        {
            _category      = CategoryBuilder.WithLibrary(LibraryId).Build();
            _categoryBooks = BookBuilder.WithLibrary(LibraryId).WithCategory(_category).IsPublic().Build(23);
            CategoryBuilder.WithLibrary(LibraryId).WithBooks(3).Build();

            _response = await Client.GetAsync($"/libraries/{LibraryId}/books?pageNumber=1&pageSize=10&categoryid={_category.Id}");

            _assert = new PagingAssert <BookView>(_response);
        }
Beispiel #17
0
        public async Task Setup()
        {
            var authors = AuthorBuilder.WithLibrary(LibraryId).WithBooks(3).WithoutImage().Build(20);

            _searchedAuthor = authors.PickRandom();

            _response = await Client.GetAsync($"/libraries/{LibraryId}/authors?query={_searchedAuthor.Name}");

            _assert = new PagingAssert <AuthorView>(_response);
        }
Beispiel #18
0
        public async Task Setup()
        {
            var account = AccountBuilder.Build();

            _book = BookBuilder.WithLibrary(LibraryId).WithPages(20).WithStatus(_status, 15).Build();

            _response = await Client.GetAsync($"/libraries/{LibraryId}/books/{_book.Id}/pages?pageSize=10&pageNumber=1&status={_status.ToDescription()}");

            _assert = new PagingAssert <BookPageView>(_response);
        }
        public async Task Setup()
        {
            var account = AccountBuilder.Build();

            _book = BookBuilder.WithLibrary(LibraryId).WithPages(20).AssignPagesTo(account.Id, 15).Build();

            _response = await Client.GetAsync($"/libraries/{LibraryId}/books/{_book.Id}/pages?pageSize=10&pageNumber=1&assignmentFilter=assigned");

            _assert = new PagingAssert <BookPageView>(_response);
        }
Beispiel #20
0
        public async Task Setup()
        {
            _series      = SeriesBuilder.WithLibrary(LibraryId).Build();
            _SeriesBooks = BookBuilder.WithLibrary(LibraryId).WithSeries(_series).IsPublic().Build(25);
            SeriesBuilder.WithLibrary(LibraryId).WithBooks(3).Build();

            _response = await Client.GetAsync($"/libraries/{LibraryId}/books?pageNumber=4&pageSize=10&seriesid={_series.Id}");

            _assert = new PagingAssert <BookView>(_response);
        }
Beispiel #21
0
        public async Task Setup()
        {
            _categories = CategoryBuilder.WithLibrary(LibraryId).Build(2);

            BookBuilder.WithLibrary(LibraryId).WithCategories(_categories).HavingSeries().WithContents(2).Build(4);

            _response = await Client.GetAsync($"/libraries/{LibraryId}/books");

            _assert = new PagingAssert <BookView>(_response);
        }
Beispiel #22
0
        public async Task Setup()
        {
            _books = BookBuilder.WithLibrary(LibraryId)
                     .IsPublic()
                     .AddToRecentReads(AccountId, 25)
                     .Build(35);

            _response = await Client.GetAsync($"/libraries/{LibraryId}/books?pageNumber=3&pageSize=10&read=true");

            _assert = new PagingAssert <BookView>(_response);
        }
Beispiel #23
0
        public async Task Setup()
        {
            _categories = CategoryBuilder.WithLibrary(LibraryId).Build(2);
            _authors    = AuthorBuilder.WithLibrary(LibraryId).Build(2);

            BookBuilder.WithLibrary(LibraryId).WithCategories(_categories).WithAuthors(_authors).IsPublic().Build(30);

            _response = await Client.GetAsync($"/libraries/{LibraryId}/books?pageNumber=2&pageSize=10&query=itle");

            _assert = new PagingAssert <BookView>(_response);
        }
        public async Task Setup()
        {
            var account2 = AccountBuilder.As(Role.Reader).Build();
            var books    = BookBuilder.WithLibrary(LibraryId)
                           .WithCategories(2)
                           .WithAuthors(2)
                           .AddToFavorites(AccountId)
                           .AddToRecentReads(AccountId)
                           .AddToFavorites(account2.Id)
                           .AddToRecentReads(account2.Id)
                           .IsPublic()
                           .Build(20);


            _response = await Client.GetAsync($"/libraries/{LibraryId}/books?pageNumber=1&pageSize=12");

            _assert = new PagingAssert <BookView>(_response);
        }