public void ProductToStringIsCorrect() { var p0 = Product0.Create(); var p1 = Product3.Create(1, "foo", null as object); var p2 = Product3.Create(2, "bar", p1); Assert.Equal("Product0()", p0.ToString()); Assert.Equal("Product3(1, foo, null)", p1.ToString()); Assert.Equal("Product3(2, bar, Product3(1, foo, null))", p2.ToString()); }
public void ValueCollectionIsCorrect() { var p1 = Product3.Create("foo", 42, "bar"); Assert.NotNull(p1.ProductValues); Assert.Equal(3, p1.ProductValues.Count()); Assert.Equal("foo", p1.ProductValues.ElementAt(0)); Assert.Equal(42, p1.ProductValues.ElementAt(1)); Assert.Equal("bar", p1.ProductValues.ElementAt(2)); }