コード例 #1
0
        public void ABxB()
        {
            var ab_b          = AB * B;
            var expectedTypes = new[] { A.ItemType(), B.ItemType(), B.ItemType() };

            Assert.That(ab_b, Is.EqualTo(Combinatorial.Of(A, B, B)));
            Assert.That(ab_b.GetType().GetGenericArguments(), Is.EquivalentTo(expectedTypes));
        }
コード例 #2
0
        public void ABxDecimal()
        {
            var decimals = new List <decimal> {
                1, 2, 3
            };
            var ab_dec        = AB.Multiply(decimals);
            var expectedTypes = new[] { A.ItemType(), B.ItemType(), decimals.ItemType() };

            Assert.That(ab_dec, Is.EqualTo(Combinatorial.Of(A, B, decimals)));
            Assert.That(ab_dec.GetType().GetGenericArguments(), Is.EquivalentTo(expectedTypes));
        }