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.")); }
public void SetUp() { _attribute = new MethodCallExpressionTransformerAttribute(typeof(FakeTransformer)); }