public void GetConstantSource2_NoConstantExpression () { var resultOperator = new ExceptResultOperator (Expression.Parameter (typeof (IEnumerable<string>), "ss")); Assert.That ( () => resultOperator.GetConstantSource2<string>(), Throws.ArgumentException .With.Message.EqualTo ( #if !NET_3_5 "The source2 expression ('ss') is no ConstantExpression, it is a TypedParameterExpression.\r\nParameter name: expression" #else "The source2 expression ('ss') is no ConstantExpression, it is a ParameterExpression.\r\nParameter name: expression" #endif )); }
public void GetConstantSource2_NoConstantExpression() { var resultOperator = new ExceptResultOperator(Expression.Parameter(typeof(IEnumerable <string>), "ss")); Assert.That( () => resultOperator.GetConstantSource2 <string>(), Throws.ArgumentException .With.Message.EqualTo( #if !NET_3_5 "The source2 expression ('ss') is no ConstantExpression, it is a TypedParameterExpression.\r\nParameter name: expression" #else "The source2 expression ('ss') is no ConstantExpression, it is a ParameterExpression.\r\nParameter name: expression" #endif )); }
public void GetConstantSource2_NoConstantExpression () { var resultOperator = new ExceptResultOperator (Expression.Parameter (typeof (IEnumerable<string>), "ss")); resultOperator.GetConstantSource2<string> (); }
public void GetConstantSource2() { Assert.That(_resultOperator.GetConstantSource2 <int> (), Is.SameAs(((ConstantExpression)_source2).Value)); }
public void GetConstantSource2_NoConstantExpression() { var resultOperator = new ExceptResultOperator(Expression.Parameter(typeof(IEnumerable <string>), "ss")); resultOperator.GetConstantSource2 <string> (); }