public void Can_Extract_Dynamic_Method_Invocations_From_A_Method()
        {
            var inspector = new MethodInspectorBuilder()
                            .ForClass <ClassWithSomeDynamicUsages>()
                            .WithMethod("MethodWithSingleDynamicCall")
                            .Get();

            var methodInvocations = inspector.ExtractDynamicMethodCallInstructions();

            Assert.That(methodInvocations, Has.Length.EqualTo(1));
        }
        public void Can_Extract_Dynamic_Cached_Fields_From_A_Method()
        {
            var inspector = new MethodInspectorBuilder()
                            .ForClass <ClassWithSomeDynamicUsages>()
                            .WithMethod("MethodWithSingleDynamicCall")
                            .Get();

            var cachedFields = inspector.ExtractInitialReflectedCachedFieldReferenceInstructions();

            Assert.That(cachedFields, Has.Length.EqualTo(1));
        }