public void TestAddProductOnCategory() { categoryManager.AddCategory(request); request.ProductId = PRODUCT_ID; categoryManager.AddProductOnCategory(request); Assert.IsNotNull(productRepository.GetAllProductsByCategoryId(request.CategoryId)); }
public void AddProductOnCategory(CategoryRequest request) { ValidateCategoryId(request.CategoryId); ValidateProductId(request.ProductId); categoryManager.AddProductOnCategory(request); }