public async Task Setup() { _categories = CategoryBuilder.WithLibrary(LibraryId).WithBooks(3).Build(4); _selectedCategory = _categories.First(); _response = await Client.GetAsync($"/libraries/{LibraryId}/categories/{_selectedCategory.Id}"); _assert = CategoryAssert.FromResponse(_response).InLibrary(LibraryId); }
public async Task Setup() { _category = new CategoryView { Name = RandomData.Name }; _response = await Client.PostObject($"/libraries/{LibraryId}/categories", _category); _assert = CategoryAssert.FromResponse(_response).InLibrary(LibraryId); }
public async Task Setup() { _expectedCategory = new CategoryView { Id = RandomData.Number, Name = RandomData.Name }; _response = await Client.PutObject($"/libraries/{LibraryId}/categories/{_expectedCategory.Id}", _expectedCategory); _assert = CategoryAssert.FromResponse(_response).InLibrary(LibraryId); }
public async Task Setup() { _categories = CategoryBuilder.WithLibrary(LibraryId).WithBooks(3).Build(4); _selectedCategory = _categories.PickRandom(); _expectedCategory = new CategoryView { Id = _selectedCategory.Id, Name = RandomData.Name }; _response = await Client.PutObject($"/libraries/{LibraryId}/categories/{_selectedCategory.Id}", _expectedCategory); _assert = CategoryAssert.FromResponse(_response).InLibrary(LibraryId); }