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
                  ));
    }
Exemplo n.º 2
0
        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
                    ));
        }
Exemplo n.º 3
0
 public void GetConstantSource2_NoConstantExpression ()
 {
   var resultOperator = new ExceptResultOperator (Expression.Parameter (typeof (IEnumerable<string>), "ss"));
   resultOperator.GetConstantSource2<string> ();
 }
Exemplo n.º 4
0
 public void GetConstantSource2()
 {
     Assert.That(_resultOperator.GetConstantSource2 <int> (), Is.SameAs(((ConstantExpression)_source2).Value));
 }
Exemplo n.º 5
0
        public void GetConstantSource2_NoConstantExpression()
        {
            var resultOperator = new ExceptResultOperator(Expression.Parameter(typeof(IEnumerable <string>), "ss"));

            resultOperator.GetConstantSource2 <string> ();
        }