public void CacheInsertTest() { var productA = new ProductA("test productA", 22, 5); var productB = new ProductB("test productB", 30, 4000, 800); _sut.InsertProduct(productA); _sut.InsertProduct(productB); var items = _sut.GetAllProducts(); Assert.Equal(2, items.Length); }
//In this step products can be loaded from db //buit for this challenge we will hardcode them private void ProductSeed(IProductCache cache) { cache.InsertProduct(new ProductA("basic electricity tariff", 22, 5)); cache.InsertProduct(new ProductB("Packaged tariff", 30, 4000, 800)); }