コード例 #1
0
        public void GetAction()
        {
            bool called = false;

            void Get <T>(T input) => called = true;

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

            var resolvedMethod = result
                                 .Should()
                                 .BeOfType <Action <string> >()
                                 .Which;

            resolvedMethod
            .Invoke("Test");

            called.Should().BeTrue();
        }