Exemple #1
0
            public void Custom_matchers_with_render_expression()
            {
                var first  = GetMatch(() => Order.IsSmallRE());
                var second = GetMatch(() => Order.IsSmallRE());

                Assert.Equal(first, second);
            }
Exemple #2
0
            public void Different_custom_matchers_with_render_expressions()
            {
                var first  = GetMatch(() => Order.IsSmallRE());
                var second = GetMatch(() => Order.IsLargeRE());

                Assert.NotEqual(first, second);
            }
Exemple #3
0
            public void Two_custom_matchers_with_render_expression_have_equal_render_expression()
            {
                var first  = GetMatch(() => Order.IsSmallRE());
                var second = GetMatch(() => Order.IsSmallRE());

                Assert.Equal(first.RenderExpression, second.RenderExpression, ExpressionComparer.Default);
            }
Exemple #4
0
 public static Order IsSmallRE()
 {
     return(Match.Create <Order>(
                order => order.MetricTons < 1000M,
                () => Order.IsSmallRE()
                ));
 }