예제 #1
0
        private void AssertCompile <TSwitchValue>(Func <Func <string, Expression>, Expression, ParameterExpression, Expression> createExpression, Asserts <TSwitchValue> expected)
        {
            var res = WithLog <TSwitchValue>(createExpression).Compile();

            foreach (var c in expected.Cases)
            {
                Assert.AreEqual(new LogAndResult <object>(c.Value, null, null), res(c.Key));
            }

            if (expected.Null != null)
            {
                Assert.AreEqual(new LogAndResult <object>(expected.Null, null, null), res(default(TSwitchValue)));
            }
        }
예제 #2
0
 public void ini()
 {
     asserts = new Asserts();
 }