Exemplo n.º 1
0
        public void MakeClosedGenericExecuteMethod()
        {
            var executeMethod = typeof(CountResultOperator).GetMethod("ExecuteInMemory", new[] { typeof(StreamedSequence) });
            var result        = _infoWithStringSequence.MakeClosedGenericExecuteMethod(executeMethod);

            Assert.That(result.GetGenericArguments(), Is.EqualTo(new[] { typeof(string) }));
        }
Exemplo n.º 2
0
        public void MakeClosedGenericExecuteMethod_WithCovariantDataType()
        {
            var info = new StreamedSequenceInfo(typeof(IEnumerable <object>), _stringExpression);

            var executeMethod = typeof(CountResultOperator).GetMethod("ExecuteInMemory", new[] { typeof(StreamedSequence) });
            var result        = info.MakeClosedGenericExecuteMethod(executeMethod);

            Assert.That(result.GetGenericArguments(), Is.EqualTo(new[] { typeof(object) }));
        }
Exemplo n.º 3
0
    public void MakeClosedGenericExecuteMethod_WithCovariantDataType ()
    {
      var info = new StreamedSequenceInfo (typeof (IEnumerable<object>), _stringExpression);

      var executeMethod = typeof (CountResultOperator).GetMethod ("ExecuteInMemory", new[] { typeof (StreamedSequence) });
      var result = info.MakeClosedGenericExecuteMethod (executeMethod);

      Assert.That (result.GetGenericArguments (), Is.EqualTo (new[] { typeof (object) }));
    }