public void SolutionOne_VerifyAllCartIds() { Solution1 sol1 = new Solution1(); sol1.run(); JsonInputObject input = sol1.input; JsonOutputObject result = sol1.output; foreach (Cart inputCart in input.carts) { Assert.IsTrue(result.carts.Exists(x => x.id == inputCart.id)); } Assert.IsFalse(result.carts.Exists(x => x.id == 999)); }
public void SolutionThree_VerifyAllCartIds() { Solution3 sol3 = new Solution3(); sol3.run(); JsonInputObject input = sol3.input; JsonOutputObject result = sol3.output; foreach (Cart inputCart in input.carts) { Assert.IsTrue(result.carts.Exists(x => x.id == inputCart.id)); } Assert.IsTrue(input.carts.Count == result.carts.Count); Assert.IsFalse(result.carts.Exists(x => x.id == 999)); }