public void Cdr_ReturnsSecondValue_GivenAPair() { var expected = 4; var pair = Problem5.Cons(3, expected); var actual = Problem5.Cdr(pair); Assert.AreEqual(expected, actual); }
public void Car_ReturnsFirstValue_GivenAPair() { var expected = 3; var pair = Problem5.Cons(expected, 4); var actual = Problem5.Car(pair); Assert.AreEqual(expected, actual); }
public void Cons_ReturnsAPair_GivenTwoArguments() { var first = 1; var second = 2; var pair = Problem5.Cons(first, second); Assert.AreEqual(first, pair.Item1); Assert.AreEqual(second, pair.Item2); }