public void RemoveItem_ValidProductId_ReturnsExpectedItemCount(string productList, char removeProductId, int expected) { foreach (char p in productList) { _pointOfSaleTerminal.ScanItem(p); } ; _pointOfSaleTerminal.RemoveItem(removeProductId); var product = _pointOfSaleTerminal.Cart.Items.Where(p => p._product.Id == removeProductId.ToString()).First(); int actual = 0; if (product != null) { actual = product.Count; } Assert.True(actual == expected); _pointOfSaleTerminal.EmptyCart(); }