public void ShouldCompileExpression() { Expression <Func <int, int> > expression = i => i + i; var subject = CachedExpression.From(expression); Assert.Equal(2, subject.Compiled(1)); }
public void ShouldCastToLambdaExpression() { Expression <Func <int, int> > expected = i => i + i; var subject = CachedExpression.From(expected); var actual = (LambdaExpression)subject; Assert.Equal(expected, actual); }