public void stop_at_a_project_2()
        {
            theRequirements = new RipplePlanRequirements {
                To = "FubuMVC"
            };

            theSolutionsShouldBe("FubuCore", "HtmlTags", "Bottles", "FubuLocalization", "FubuMVC");
        }
        public void stop_at_a_to_project()
        {
            theRequirements = new RipplePlanRequirements {
                To = "Bottles"
            };

            theSolutionsShouldBe("FubuCore", "Bottles");
        }
        public void start_at_a_project_skips_projects_that_are_not_dependent_on_the_from()
        {
            theRequirements = new RipplePlanRequirements
            {
                From = "Validation"
            };

            theSolutionsShouldBe("Validation");
        }
        public void set_from_and_to()
        {
            theRequirements = new RipplePlanRequirements {
                From = "HtmlTags",
                To   = "FubuMVC"
            };

            theSolutionsShouldBe("HtmlTags", "FubuMVC");
        }
        public void start_at_a_project_2()
        {
            theRequirements = new RipplePlanRequirements
            {
                From = "HtmlTags"
            };

            theSolutionsShouldBe("HtmlTags", "FubuMVC", "FubuMVC.Core.View", "FubuMVC.Core.UI");
        }
        public void set_from_and_to_4()
        {
            theRequirements = new RipplePlanRequirements
            {
                From = "FubuCore",
                To   = "FubuMVC.Core.UI"
            };

            theSolutionsShouldBe("FubuCore", "Bottles", "FubuLocalization", "FubuMVC", "FubuMVC.Core.View", "FubuMVC.Core.UI");
        }
        public void direct_skips_intermediate_steps()
        {
            theRequirements = new RipplePlanRequirements
            {
                From   = "FubuCore",
                To     = "FubuMVC",
                Direct = true
            };

            theSolutionsShouldBe("FubuCore", "FubuMVC");
        }
        public void throw_invalid_solution_if_from_does_not_exist()
        {
            Exception <InvalidSolutionException> .ShouldBeThrownBy(() =>
            {
                theRequirements = new RipplePlanRequirements()
                {
                    From = "junk",
                };

                theRequirements.SelectSolutions(theScenario.Graph);
            });
        }
 public void get_them_all()
 {
     theRequirements = new RipplePlanRequirements();
     theSolutionsShouldBe("FubuCore",
                          "HtmlTags",
                          "Bottles",
                          "FubuLocalization",
                          "Validation",
                          "FubuMVC",
                          "FubuMVC.Core.View",
                          "FubuMVC.Core.UI");
 }
        public void create_a_plan_for_only_two_projects()
        {
            theRequirements = new RipplePlanRequirements {
                From = "FubuCore",
                To   = "Bottles"
            };

            theRippleStepsShouldBe(
                build("FubuCore"),
                move("FubuCore").To("Bottles"),
                build("Bottles")
                );
        }
        public void create_a_plan_for_setting_from_and_to_with_no_build()
        {
            theRequirements = new RipplePlanRequirements
            {
                From      = "FubuCore",
                To        = "Bottles",
                SkipBuild = true
            };

            theRippleStepsShouldBe(
                build("FubuCore"),
                move("FubuCore").To("Bottles")
                );
        }
        public void trying_direct_option_without_a_From()
        {
            Exception <InvalidOperationException> .ShouldBeThrownBy(() =>
            {
                theRequirements = new RipplePlanRequirements()
                {
                    From   = null,
                    To     = "FubuMVC",
                    Direct = true
                };

                theRequirements.SelectSolutions(theScenario.Graph);
            });
        }
        public void create_a_direct_plan()
        {
            theRequirements = new RipplePlanRequirements
            {
                From   = "FubuCore",
                To     = "FubuMVC",
                Direct = true
            };

            theRippleStepsShouldBe(
                build("FubuCore"),
                move("FubuCore").To("FubuMVC"),

                build("FubuMVC")
                );
        }
        public void create_a_plan_for_setting_from_and_to()
        {
            theRequirements = new RipplePlanRequirements {
                From = "FubuCore",
                To   = "FubuMVC"
            };

            theRippleStepsShouldBe(
                build("FubuCore"),
                move("FubuCore").To("Bottles"),

                build("Bottles"),

                move("FubuCore").To("FubuLocalization"),
                build("FubuLocalization"),

                move("Bottles").To("FubuMVC"),
                move("FubuCore").To("FubuMVC"),
                move("FubuLocalization").To("FubuMVC"),

                build("FubuMVC")
                );
        }
        public void SetUp()
        {
            theScenario = SolutionGraphScenario.Create(scenario =>
            {
                scenario.Solution("Bottles", bottles =>
                {
                    bottles.Publishes("Bottles", x => x.Assembly("Bottles.dll", "lib").DependsOn("FubuCore"));
                    bottles.ProjectDependency("Bottles", "FubuCore");
                });

                // Defaults to "FubuCore.dll" targeting "lib"
                scenario.Solution("FubuCore", fubucore => fubucore.Publishes("FubuCore"));

                scenario.Solution("FubuLocalization", localization =>
                {
                    localization.Publishes("FubuLocalization", x => x.Assembly("FubuLocalization.dll", "lib").DependsOn("FubuCore"));
                    localization.ProjectDependency("FubuLocalization", "FubuCore");
                });

                scenario.Solution("FubuMVC", fubumvc =>
                {
                    fubumvc.Publishes("FubuMVC.Core", x =>
                    {
                        x.Assembly("FubuMVC.Core.dll", "lib\\net40");
                        x.DependsOn("Bottles");
                        x.DependsOn("FubuCore");
                        x.DependsOn("FubuLocalization");
                        x.DependsOn("HtmlTags");
                    });

                    fubumvc.ProjectDependency("FubuMVC.Core", "Bottles");
                    fubumvc.ProjectDependency("FubuMVC.Core", "FubuCore");
                    fubumvc.ProjectDependency("FubuMVC.Core", "FubuLocalization");
                    fubumvc.ProjectDependency("FubuMVC.Core", "HtmlTags");
                });

                scenario.Solution("FubuMVC.Core.View", views =>
                {
                    views.Publishes("FubuMVC.Core.View", x => x.Assembly("FubuMVC.Core.View.dll", "lib\\net40").DependsOn("FubuMVC.Core"));

                    views.ProjectDependency("FubuMVC.Core.View", "Bottles");
                    views.ProjectDependency("FubuMVC.Core.View", "FubuCore");
                    views.ProjectDependency("FubuMVC.Core.View", "FubuLocalization");
                    views.ProjectDependency("FubuMVC.Core.View", "FubuMVC.Core");
                    views.ProjectDependency("FubuMVC.Core.View", "HtmlTags");
                });

                scenario.Solution("FubuMVC.Core.UI", ui =>
                {
                    ui.Publishes("FubuMVC.Core.UI", x => x.Assembly("FubuMVC.Core.UI.dll", "lib\\net40").DependsOn("FubuMVC.Core.View"));

                    ui.ProjectDependency("FubuMVC.Core.UI", "Bottles");
                    ui.ProjectDependency("FubuMVC.Core.UI", "FubuCore");
                    ui.ProjectDependency("FubuMVC.Core.UI", "FubuLocalization");
                    ui.ProjectDependency("FubuMVC.Core.UI", "FubuMVC.Core");
                    ui.ProjectDependency("FubuMVC.Core.UI", "FubuMVC.Core.View");
                    ui.ProjectDependency("FubuMVC.Core.UI", "HtmlTags");
                });

                scenario.Solution("HtmlTags", htmlTags => htmlTags.Publishes("HtmlTags", x => x.Assembly("HtmlTags.dll", "lib\\4.0")));
            });

            theRequirements = null;
        }
 public void SetUp()
 {
     theRequirements = null;
 }