public async Task FindAsync_10_ReturnsValidSubcategory() { // Arrange const int expectedId = SubcategoriesCount; // Act var subcategory = await _subcategoryService.FindAsync(expectedId); // Assert Assert.NotNull(subcategory); Assert.Equal(expectedId, subcategory.Id); }
public async Task <SubcategoryView> Get(int id) { var subcategory = await _subcategoryService.FindAsync(id); return(_mapper.Map <SubcategoryView>(subcategory)); }