예제 #1
0
        public void GetExpressionTransformer_NotInstantiable()
        {
            var attribute = new MethodCallExpressionTransformerAttribute(typeof(FakeTransformerWithoutDefaultCtor));

            Assert.That(
                () => attribute.GetExpressionTransformer(ExpressionHelper.CreateMethodCallExpression <Cook>()),
                Throws.InvalidOperationException.With.Message.EqualTo(
                    "The method call transformer "
                    + "'Remotion.Linq.UnitTests.Parsing.ExpressionTreeVisitors.Transformation.PredefinedTransformations.MethodCallExpressionTransformerAttributeTest+FakeTransformerWithoutDefaultCtor' "
                    + "has no public default constructor and therefore cannot be used with the MethodCallExpressionTransformerAttribute."));
        }
예제 #2
0
 public void SetUp()
 {
     _attribute = new MethodCallExpressionTransformerAttribute(typeof(FakeTransformer));
 }