public void ExecutesMethodsInPolicy()
        {
            Spy.Executed = false;
            MockBuilderContext context  = new MockBuilderContext();
            MethodCallStrategy strategy = new MethodCallStrategy();
            MethodCallPolicy   policy   = new MethodCallPolicy();

            policy.Methods.Add(new ReflectionMethodCallInfo(typeof(Spy).GetMethod("InjectionMethod")));
            context.Policies.Set <IMethodCallPolicy>(policy, typeof(Spy));

            strategy.BuildUp(context, typeof(Spy), new Spy());

            Assert.True(Spy.Executed);
        }
        protected override void AddParametersToPolicy(IBuilderContext context,
                                                      object buildKey,
                                                      IMemberInfo <MethodInfo> member,
                                                      IEnumerable <IParameter> parameters)
        {
            IMethodCallPolicy result = context.Policies.Get <IMethodCallPolicy>(buildKey);

            if (result == null)
            {
                result = new MethodCallPolicy();
                context.Policies.Set(result, buildKey);
            }

            result.Methods.Add(new ReflectionMethodCallInfo(member.MemberInfo, parameters));
        }