public async Task Should_Get_List_Of_Book() { var result = await _bookAppService.GetListAsync(new PagedAndSortedResultRequestDto()); result.TotalCount.ShouldBeGreaterThan(0); result.Items.ShouldContain(b => b.Name == "1984"); }
public async Task Should_Get_List_Of_Books() { var result = await _bookAppService.GetListAsync( new PagedAndSortedResultRequestDto() ); result.TotalCount.ShouldBeGreaterThan(0); result.Items.ShouldContain(x => x.Name == "2021荒岛日记" && x.AuthorName == "Li"); }
public async Task DoIt() { var books = await _bookService.GetListAsync(); foreach (var book in books) { Console.WriteLine($"[BOOK {book.Id}] Name={book.Name}"); } }
public async Task RunAsync() { //While it seems like a regular method call, it actually calls a remote REST API. var output = await _bookAppService.GetListAsync(new PagedAndSortedResultRequestDto()); foreach (var bookDto in output.Items) { Console.WriteLine($"[BOOK {bookDto.Id}] Name={bookDto.Name}, Price={bookDto.Price}"); } }
public async Task Should_Get_List_Of_Books() { //Act var result = await _bookAppService.GetListAsync( new PagedAndSortedResultRequestDto() ); //Assert result.TotalCount.ShouldBeGreaterThan(0); result.Items.ShouldContain(b => b.Name == "Spinning Silver"); }
public async Task Should_Get_List_Of_Books() { //Act 行为: 获取用户列表,并执行检查. var result = await _bookAppService.GetListAsync( new PagedAndSortedResultRequestDto() ); //Assert 断言: 已确定1984 是存在的 检查 "1984" 这本书的名称 result.TotalCount.ShouldBeGreaterThan(0); result.Items.ShouldContain(b => b.Name == "1984" && b.AuthorName == "George Orwell"); }
public async Task GetListAsync() { // Act var result = await _bookAppService.GetListAsync(new GetBooksInput()); // Assert result.TotalCount.ShouldBe(2); result.Items.Count.ShouldBe(2); result.Items.Any(x => x.Id == Guid.Parse("682c0b6a-1d72-4094-b180-cea1dab40ed5")).ShouldBe(true); result.Items.Any(x => x.Id == Guid.Parse("6d42ba17-ff44-49f7-bb67-ee579a6e3121")).ShouldBe(true); }
public async Task RunAsync() { await TestWithDynamicProxiesAsync(); await TestWithHttpClientAndIdentityModelAuthenticationServiceAsync(); await TestAllManuallyAsync(); var result = await _bookAppService.GetListAsync(new PagedAndSortedResultRequestDto()); foreach (var bookDto in result.Items) { Console.WriteLine(bookDto.Name); } }
public async Task Should_Get_List_Of_Books() { //Act var result = await _bookAppService.GetListAsync( new PagedAndSortedResultRequestDto() ); //Assert //断言书本数量大于0 result.TotalCount.ShouldBeGreaterThan(0); //一定有一个书叫 Test book 1 result.Items.ShouldContain(b => b.Name == "Test book 1"); }
public async Task Should_Create_A_Valid_BookMark() { var books = await _bookAppService.GetListAsync(new PagedAndSortedResultRequestDto()); var firstAuthor = books.Items.First(); string bookMarkContent = "sfsagsagsdgsahsa"; var result = await _bookMarkAppService.CreateAsync(new CreateUpdateBookMarkDto() { BookId = firstAuthor.Id, Name = "荒岛日记书签", BookMarkContent = bookMarkContent, ContentLength = bookMarkContent.Length, PageNum = 1, RowNum = 20, StartingWordNum = 4, }); result.Id.ShouldNotBe(Guid.Empty); result.Name.ShouldBe("荒岛日记书签"); }
public async Task <PagedResultDto <BookDto> > GetListAsync(PageAndStortedAndFilterRequestDto input) { return(await _bookAppService.GetListAsync(input)); }
public Task <PagedResultDto <BookDto> > GetListAsync(PagedAndSortedResultRequestDto input) { return(_bookAppService.GetListAsync(input)); }
public virtual Task <PagedResultDto <BookDto> > GetListAsync(GetBooksInput input) { return(_bookAppService.GetListAsync(input)); }
public Task <PagedResultDto <BookDto> > GetListAsync(PagedAndSortedResultRequestDto input) { input.MaxResultCount = 1; return(_service.GetListAsync(input)); }
public virtual Task <PagedResultDto <BookDto> > GetListAsync(PagedAndSortedResultRequestDto input) { return(_service.GetListAsync(input)); }
public async Task <PagedResultDto <BookDto> > GetBooksAsync() { return(await _bookAppService.GetListAsync(new PagedAndSortedResultRequestDto())); }
public async Task <PagedResultDto <BookDto> > GetListAsync(GetBookListInput input) { return(await _bookAppService.GetListAsync(input)); }