public void GetTransformer() { var attribute = new LinqPropertyRedirectionAttribute(typeof(Order), "OrderNumber"); var transformer = attribute.GetExpressionTransformer(null); Assert.That(transformer, Is.TypeOf(typeof(LinqPropertyRedirectionAttribute.MethodCallTransformer))); Assert.That(((LinqPropertyRedirectionAttribute.MethodCallTransformer)transformer).MappedProperty, Is.SameAs(typeof(Order).GetProperty("OrderNumber"))); }
public void GetTransformer_NonExistingProperty() { var attribute = new LinqPropertyRedirectionAttribute(typeof(Order), "Hugo"); attribute.GetExpressionTransformer(null); }