Esempio n. 1
0
        public void ZeroDimensionalProductsAreAlwaysEqual()
        {
            var p1 = Product0.Create();
            var p2 = Product0.Create();

            Assert.True(p1.Equals(p2));
        }
Esempio n. 2
0
        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());
        }