public void CalculateOrderDiscount1() { ProductMapper productMapper = new ProductMapper(); Product product = productMapper.FindProductById(this.ProductID); CategoryMapper categoryMapper = new CategoryMapper(); Category category = categoryMapper.FindCategoryById(product.CategoryID); DoDiscountCalculation(this, category); }
public void TestFindCategoryById() { int categoryId = 6; CategoryMapper categoryMapper = new CategoryMapper(); Category category = categoryMapper.FindCategoryById(6); Assert.AreEqual(categoryId, category.CategoryID); Assert.AreEqual("Meat/Poultry", category.CategoryName); Assert.AreEqual(categoryId.ToString(), category.DomainId); }