public void ProductCatalog_ShouldThrow_DuplicateProductException_WhenAdding_DuplicateProduct() { ProductCatalogService ProductCatalogService = new ProductCatalogService(); ProductCatalogService.AddProduct('A', 30); ProductCatalogService.AddProduct('A', 30); }
public void ProductCatalog_ShouldReturn_ProductPrice_ByPassingProductName() { ProductCatalogService ProductCatalogService = new ProductCatalogService(); ProductCatalogService.AddProduct('A', 30); var price = ProductCatalogService.GetPrice('A'); Assert.AreEqual(price, 30); }
public void ProductCatalog_ShouldReturnZero_When_ProductNotFound() { ProductCatalogService ProductCatalogService = new ProductCatalogService(); ProductCatalogService.AddProduct('A', 30); var price = ProductCatalogService.GetPrice('B'); Assert.AreEqual(price, 0); }