Esempio n. 1
0
        public void Test3Type_CanBeTypeMatchedUsingWhereExpressionAndDoValue()
        {
            ITest test   = new Test3();
            var   result = test.TypeMatch().To <int>()
                           .CaseOf <Test3>().Where(t => t.F2() == 2).Do(2)
                           .CaseOf <Test3>().Where(t => t.F2() == 3).Do(3)
                           .Result();

            Assert.AreEqual(3, result);
        }
Esempio n. 2
0
        public void Test3Type_CanBeTypeMatchedUsingITestAndDoValue()
        {
            ITest test   = new Test3();
            var   result = test.TypeMatch().To <int>()
                           .CaseOf <Test3>().Do(3)
                           .CaseOf <Test2>().Do(2)
                           .CaseOf <Test1>().Do(1)
                           .Result();

            Assert.AreEqual(3, result);
        }
Esempio n. 3
0
        public void Test3Type_CanBeTypeMatchedUsingITest()
        {
            ITest test   = new Test3();
            var   result = test.TypeMatch().To <int>()
                           .CaseOf <Test3>().Do(t => t.F2())
                           .CaseOf <Test2>().Do(t => t.F2())
                           .CaseOf <Test1>().Do(t => t.F1())
                           .Result();

            Assert.AreEqual(3, result);
        }