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) })); }
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) })); }
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) })); }