public void StrategyCreatesBuildPlanWhenItDoesntExist()
        {
            MockBuilderContext context = new MockBuilderContext();
            context.Strategies.Add(new BuildPlanStrategy());
            MockBuildPlanCreatorPolicy policy = new MockBuildPlanCreatorPolicy();
            context.Policies.SetDefault<IBuildPlanCreatorPolicy>(policy);

            object result = context.ExecuteBuildUp(new NamedTypeBuildKey<object>(), null);

            Assert.IsNotNull(result);
            Assert.IsTrue(policy.PolicyWasCreated);

            IBuildPlanPolicy plan = context.Policies.Get<IBuildPlanPolicy>(new NamedTypeBuildKey(typeof(object)));
            Assert.IsNotNull(plan);
        }
        public void StrategyCreatesBuildPlanWhenItDoesntExist()
        {
            MockBuilderContext context = new MockBuilderContext();

            context.Strategies.Add(new BuildPlanStrategy());
            MockBuildPlanCreatorPolicy policy = new MockBuildPlanCreatorPolicy();

            context.Policies.SetDefault <IBuildPlanCreatorPolicy>(policy);

            object result = context.ExecuteBuildUp(new NamedTypeBuildKey <object>(), null);

            Assert.IsNotNull(result);
            Assert.IsTrue(policy.PolicyWasCreated);

            IBuildPlanPolicy plan = context.Policies.Get <IBuildPlanPolicy>(new NamedTypeBuildKey(typeof(object)));

            Assert.IsNotNull(plan);
        }