public void GetConstantSource2_NoConstantExpression ()
    {
      var resultOperator = new UnionResultOperator ("i", typeof (string), Expression.Parameter (typeof (IEnumerable<string>), "ss"));
      Assert.That (
          () => resultOperator.GetConstantSource2(),
          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
                  ));
    }
示例#2
0
        public void GetConstantSource2_NoConstantExpression()
        {
            var resultOperator = new UnionResultOperator("i", typeof(string), Expression.Parameter(typeof(IEnumerable <string>), "ss"));

            Assert.That(
                () => resultOperator.GetConstantSource2(),
                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
                    ));
        }
示例#3
0
 public void GetConstantSource2()
 {
     Assert.That(_resultOperator.GetConstantSource2(), Is.SameAs(((ConstantExpression)_source2).Value));
 }
 public void GetConstantSource2_NoConstantExpression ()
 {
   var resultOperator = new UnionResultOperator ("i", typeof (string), Expression.Parameter (typeof (IEnumerable<string>), "ss"));
   resultOperator.GetConstantSource2 ();
 }
示例#5
0
        public void GetConstantSource2_NoConstantExpression()
        {
            var resultOperator = new UnionResultOperator("i", typeof(string), Expression.Parameter(typeof(IEnumerable <string>), "ss"));

            resultOperator.GetConstantSource2();
        }