Esempio n. 1
0
        public void GetFunc()
        {
            var resultInstance = new TypeValuePair(typeof(int), 12345);

            TypeValuePair Get <T>(T input) => resultInstance;

            var result = MethodUtils.MakeMatchArg(Get, typeof(string));

            var resolvedMethod = result
                                 .Should()
                                 .BeOfType <Func <string, TypeValuePair> >()
                                 .Which;
            var typePairResult = resolvedMethod
                                 .Invoke("Test");

            typePairResult.Should().BeEquivalentTo(resultInstance);
        }