public void SetUp()
        {
            FeedScenario.Create(scenario => scenario.For(Feed.Fubu).Add("fubu", "1.2.0.0"));

            theScenario = SolutionGraphScenario.Create(scenario =>
            {
                scenario.Solution("Test", test =>
                {
                    test.SolutionDependency("fubu", "1.0.0.1", UpdateMode.Fixed);
                    test.LocalDependency("fubu", "1.0.0.1");
                });
            });

            theSolution = theScenario.Find("Test");

            theBuilder = new NugetPlanBuilder();

            var request = new NugetPlanRequest
            {
                Solution     = theSolution,
                Dependency   = new Dependency("fubu"),
                Operation    = OperationType.Update,
                ForceUpdates = false
            };

            thePlan = theBuilder.PlanFor(request);
        }
        public void SetUp()
        {
            FeedScenario.Create(scenario => scenario.For(Feed.Fubu).Add("FubuCore", "1.0.0.1"));
            FeedScenario.Create(scenario =>
            {
                scenario.For(Feed.NuGetV2)
                .Add("TopShelf", "1.1.0.0")
                .Add("log4net", "1.0.0.5")
                .Add("log4net", "1.0.1.1")
                .ConfigureRepository(nuget =>
                {
                    nuget.ConfigurePackage("TopShelf", "1.1.0.0", topshelf => topshelf.DependsOn("log4net"));
                });
            });

            theScenario = SolutionScenario.Create(scenario => scenario.Solution("Test"));
            theSolution = theScenario.Find("Test");

            theBuilder = new NugetPlanBuilder();

            var request = new NugetPlanRequest
            {
                Solution   = theSolution,
                Dependency = new Dependency("TopShelf", "1.1.0.0", UpdateMode.Fixed),
                Operation  = OperationType.Install,
                Project    = "Test"
            };

            thePlan = theBuilder.PlanFor(request);
        }
        public void SetUp()
        {
            thePlanBuilder = MockRepository.GenerateStub <INugetPlanBuilder>();

            var r1 = new NugetPlanRequest {
                Dependency = new Dependency("d1")
            };
            var r2 = new NugetPlanRequest {
                Dependency = new Dependency("d2")
            };
            var r3 = new NugetPlanRequest {
                Dependency = new Dependency("d3")
            };

            s1 = MockRepository.GenerateStub <INugetStep>();
            s2 = MockRepository.GenerateStub <INugetStep>();
            s3 = MockRepository.GenerateStub <INugetStep>();

            thePlanBuilder.Stub(x => x.PlanFor(r1)).Return(new NugetPlan(s1));
            thePlanBuilder.Stub(x => x.PlanFor(r2)).Return(new NugetPlan(s2));
            thePlanBuilder.Stub(x => x.PlanFor(r3)).Return(new NugetPlan(s3));

            theSolution = new Solution();
            theSolution.UseBuilder(thePlanBuilder);
            theSolution.UseStorage(new StubNugetStorage());

            var input = new StubNugetOperationContext(r1, r2, r3);

            new NugetOperation {
                Solution = theSolution
            }.Execute(input, null);
        }
        public void SetUp()
        {
            theScenario = SolutionScenario.Create(scenario => scenario.Solution("Test"));

            theSolution = theScenario.Find("Test");

            var cache = theSolution.Cache.ToFeed();

            FeedScenario.Create(scenario =>
            {
                scenario.For(cache).Add("FubuCore", "1.0.0.1");
                scenario.Offline();
            });

            theBuilder = new NugetPlanBuilder();

            var request = new NugetPlanRequest
            {
                Solution   = theSolution,
                Dependency = new Dependency("FubuCore", "1.0.0.1", UpdateMode.Fixed),
                Operation  = OperationType.Install,
                Project    = "Test"
            };

            thePlan = theBuilder.PlanFor(request);
        }
        public void SetUp()
        {
            theScenario = SolutionGraphScenario.Create(scenario =>
            {
                scenario.Solution("Test", sln =>
                {
                    sln.LocalDependency("FubuCore", "1.1.0.0");

                    sln.ProjectDependency("Test1", "FubuCore");
                });
            });

            theSolution = theScenario.Find("Test");

            FeedScenario.Create(scenario =>
            {
                scenario.For(theSolution.Cache.ToFeed())
                .Add("FubuCore", "1.1.0.0")
                .Add("FubuCore", "1.2.0.0");

                scenario.Offline();
            });

            theBuilder = new NugetPlanBuilder();

            var request = new NugetPlanRequest
            {
                Solution     = theSolution,
                Dependency   = new Dependency("FubuCore"),
                Operation    = OperationType.Update,
                ForceUpdates = false
            };

            thePlan = theBuilder.PlanFor(request);
        }
Beispiel #6
0
        public void SetUp()
        {
            FeedScenario.Create(scenario =>
            {
                scenario.For(Feed.NuGetV2)
                .Add("FubuCore", "1.2.0.0-alpha");
            });

            theScenario = SolutionScenario.Create(scenario => scenario.Solution("Test"));

            theSolution = theScenario.Find("Test");

            theBuilder = new NugetPlanBuilder();

            var request = new NugetPlanRequest
            {
                Solution   = theSolution,
                Dependency = new Dependency("FubuCore", "1.2.0.0", UpdateMode.Fixed)
                {
                    NugetStability = NugetStability.Anything
                },
                Operation = OperationType.Install,
                Project   = "Test"
            };

            thePlan = theBuilder.PlanFor(request);
        }
        public void SetUp()
        {
            FeedScenario.Create(scenario =>
            {
                scenario.For(Feed.Fubu)
                .Add("Serenity", "1.1.0.0")
                .Add("Serenity", "1.2.0.0")
                .ConfigureRepository(fubu =>
                {
                    fubu.ConfigurePackage("Serenity", "1.1.0.0", serenity => serenity.DependsOn("WebDriver", "1.1.0.0"));
                    fubu.ConfigurePackage("Serenity", "1.2.0.0", serenity =>
                    {
                        serenity.DependsOn("WebDriver", "1.2.0.0");
                        serenity.DependsOn("Something");
                        serenity.DependsOn("SomethingElse", "0.9.9.9");
                    });
                });

                scenario.For(Feed.NuGetV2)
                .Add("Something", "1.0.0.5")
                .Add("SomethingElse", "0.9.9.9")
                .Add("WebDriver", "1.1.0.0")
                .Add("WebDriver", "1.2.0.0");
            });

            theScenario = SolutionScenario.Create(scenario =>
            {
                scenario.Solution("Test", sln =>
                {
                    sln.SolutionDependency("WebDriver", "1.1.0.0", UpdateMode.Fixed);
                    sln.SolutionDependency("Serenity", "1.1.0.0", UpdateMode.Float);

                    sln.LocalDependency("Serenity", "1.1.0.0");

                    sln.ProjectDependency("Test1", "Serenity");
                    sln.ProjectDependency("Test1", "WebDriver");

                    sln.ProjectDependency("Test2", "Serenity");
                    sln.ProjectDependency("Test2", "WebDriver");
                });
            });

            theSolution = theScenario.Find("Test");

            theBuilder = new NugetPlanBuilder();

            var request = new NugetPlanRequest
            {
                Solution     = theSolution,
                Dependency   = new Dependency("Serenity"),
                Operation    = OperationType.Update,
                ForceUpdates = true
            };

            thePlan = theBuilder.PlanFor(request);
        }
        public void no_update_for_float_when_not_an_update()
        {
            var request = new NugetPlanRequest
            {
                Dependency   = new Dependency("FubuCore"),
                ForceUpdates = false,
                Operation    = OperationType.Install,
            };

            request.ShouldUpdate(new Dependency("FubuCore", "1.0.0.0", UpdateMode.Float)).ShouldBeFalse();
        }
        public void copying_the_request_sets_the_parent()
        {
            var request = new NugetPlanRequest
            {
                Dependency   = new Dependency("FubuCore"),
                ForceUpdates = true,
                Operation    = OperationType.Update,
            };

            request.CopyFor(new Dependency("Bottles")).Parent.ShouldEqual(request);
        }
        public void copying_the_request_marks_as_transitive()
        {
            var request = new NugetPlanRequest
            {
                Dependency   = new Dependency("FubuCore"),
                ForceUpdates = true,
                Operation    = OperationType.Update,
            };

            request.CopyFor(new Dependency("Bottles")).IsTransitive().ShouldBeTrue();
        }
        public void is_transitive()
        {
            var request = new NugetPlanRequest
            {
                Dependency   = new Dependency("FubuCore"),
                ForceUpdates = true,
                Operation    = OperationType.Update,
            };

            request.IsTransitive().ShouldBeFalse();
        }
        public void original_dependency()
        {
            var request = new NugetPlanRequest
            {
                Dependency   = new Dependency("FubuCore"),
                ForceUpdates = false,
                Operation    = OperationType.Install,
            };

            request.Origin().ShouldEqual(request.Dependency);
        }
        public void should_update_forced_update()
        {
            var request = new NugetPlanRequest
            {
                Dependency   = new Dependency("FubuCore"),
                ForceUpdates = true,
                Operation    = OperationType.Update,
            };

            request.ShouldUpdate(new Dependency("FubuCore", "1.0.0.0", UpdateMode.Fixed)).ShouldBeTrue();
        }
        public void should_update_forced_transitive_install()
        {
            var request = new NugetPlanRequest
            {
                Dependency   = new Dependency("FubuCore"),
                ForceUpdates = true,
                Operation    = OperationType.Install,
            };

            request.CopyFor(new Dependency("Bottles", "1.0.0.0", UpdateMode.Fixed)).ShouldUpdate(new Dependency("Bottles")).ShouldBeTrue();
        }
        public void update_for_fixed_when_not_forced_and_not_batched()
        {
            var request = new NugetPlanRequest
            {
                Dependency   = new Dependency("FubuCore"),
                ForceUpdates = false,
                Operation    = OperationType.Update,
            };

            request.ShouldUpdate(new Dependency("FubuCore", "1.0.0.0", UpdateMode.Fixed)).ShouldBeTrue();
        }
        public void original_dependency_recursive()
        {
            var request = new NugetPlanRequest
            {
                Dependency   = new Dependency("FubuCore"),
                ForceUpdates = false,
                Operation    = OperationType.Install,
            };

            request.CopyFor(new Dependency("Bottles"))
            .CopyFor(new Dependency("Something"))
            .Origin()
            .ShouldEqual(request.Dependency);
        }
        public void should_not_force_update_for_the_original_dependency_when_batched()
        {
            var request = new NugetPlanRequest
            {
                Dependency   = new Dependency("FubuCore"),
                ForceUpdates = false,
                Batched      = true,
                Operation    = OperationType.Install,
            };

            request.CopyFor(new Dependency("Bottles"))
            .CopyFor(new Dependency("Something"))
            .ShouldForce(request.Dependency)
            .ShouldBeFalse();
        }
Beispiel #18
0
        public void SetUp()
        {
            FeedScenario.Create(scenario =>
            {
                scenario.For(Feed.Fubu)
                .Add("FubuTestingSupport", "1.1.0.0")
                .Add("FubuTestingSupport", "1.2.0.0")
                .Add("StructureMap", "2.6.4")         // this just makes the test flow easier
                .ConfigureRepository(fubu =>
                {
                    fubu.ConfigurePackage("FubuTestingSupport", "1.2.0.0", support =>
                    {
                        support.DependsOn("StructureMap").Min("2.6.4");
                    });
                });

                scenario.For(Feed.NuGetV2)
                .Add("structuremap", "2.6.3");
            });

            theScenario = SolutionScenario.Create(scenario =>
            {
                scenario.Solution("Test", sln =>
                {
                    sln.LocalDependency("FubuTestingSupport", "1.1.0.0");
                    sln.LocalDependency("structuremap", "2.6.3");

                    sln.SolutionDependency("structuremap", "2.6.3", UpdateMode.Fixed);

                    sln.ProjectDependency("Test1", "FubuTestingSupport");
                    sln.ProjectDependency("Test1", "structuremap");
                });
            });

            theSolution = theScenario.Find("Test");

            theBuilder = new NugetPlanBuilder();

            var request = new NugetPlanRequest
            {
                Solution     = theSolution,
                Dependency   = new Dependency("FubuTestingSupport"),
                Operation    = OperationType.Update,
                ForceUpdates = false
            };

            thePlan = theBuilder.PlanFor(request);
        }
Beispiel #19
0
        public void SetUp()
        {
            FeedScenario.Create(scenario =>
            {
                scenario.For(Feed.Fubu)
                .Add("FubuMVC.Katana", "1.0.0.1")
                .Add("FubuMVC.Core", "1.0.1.1")
                .Add("FubuMVC.Core", "1.1.0.2")
                .Add("FubuMVC.OwinHost", "1.2.0.0")
                .Add("FubuMVC.OwinHost", "1.3.0.0")
                .ConfigureRepository(teamcity =>
                {
                    teamcity.ConfigurePackage("FubuMVC.Katana", "1.0.0.1", katana =>
                    {
                        katana.DependsOn("FubuMVC.Core");
                        katana.DependsOn("FubuMVC.OwinHost");
                    });

                    teamcity.ConfigurePackage("FubuMVC.OwinHost", "1.2.0.0", owin => owin.DependsOn("FubuMVC.Core"));
                    teamcity.ConfigurePackage("FubuMVC.OwinHost", "1.3.0.0", owin =>
                    {
                        owin.DependsOn("FubuMVC.Core");
                        owin.DependsOn("FixedNuget");
                    });
                });

                scenario.For(Feed.NuGetV2)
                .Add("FixedNuget", "1.0.0.0");
            });

            theScenario = SolutionGraphScenario.Create(scenario => scenario.Solution("Test"));
            theSolution = theScenario.Find("Test");

            theBuilder = new NugetPlanBuilder();

            var request = new NugetPlanRequest
            {
                Solution   = theSolution,
                Dependency = new Dependency("FubuMVC.Katana", UpdateMode.Float),
                Operation  = OperationType.Install,
                Project    = "Test"
            };

            thePlan = theBuilder.PlanFor(request);
        }
Beispiel #20
0
        public void SetUp()
        {
            FeedScenario.Create(scenario => scenario.For(Feed.NuGetV2).Add("fubu", "1.2.0.0"));

            theScenario = SolutionGraphScenario.Create(scenario => scenario.Solution("Test"));
            theSolution = theScenario.Find("Test");

            theBuilder = new NugetPlanBuilder();

            var request = new NugetPlanRequest
            {
                Solution   = theSolution,
                Dependency = new Dependency("fubu", "1.2.0.0", UpdateMode.Fixed),
                Operation  = OperationType.Install
            };

            thePlan = theBuilder.PlanFor(request);
        }
        public void copy_for_dependency()
        {
            var solution = new Solution();
            var request  = new NugetPlanRequest
            {
                Dependency   = new Dependency("FubuCore"),
                ForceUpdates = true,
                Operation    = OperationType.Update,
                Solution     = solution
            };

            var copied = request.CopyFor(new Dependency("Bottles"));

            copied.Dependency.Name.ShouldEqual("Bottles");
            copied.ForceUpdates.ShouldEqual(request.ForceUpdates);
            copied.Operation.ShouldEqual(request.Operation);
            copied.Solution.ShouldEqual(request.Solution);
        }
        public void SetUp()
        {
            FeedScenario.Create(scenario =>
            {
                scenario.For(Feed.NuGetV2)
                .Add("FubuCore", "1.2.0.0")
                .Add("FubuCore", "1.3.0.0")
                .Add("Bottles", "1.1.0.0")
                .ConfigureRepository(nuget =>
                {
                    nuget.ConfigurePackage("Bottles", "1.1.0.0", bottles => bottles.DependsOn("FubuCore").Min("1.3.0.0"));
                });
            });

            theScenario = SolutionGraphScenario.Create(scenario =>
            {
                scenario.Solution("Test", test =>
                {
                    test.ProjectDependency("Test", "FubuCore");
                    test.LocalDependency("FubuCore", "1.2.0.0");
                    test.SolutionDependency("FubuCore", "1.2.0.0", UpdateMode.Fixed);
                });
            });

            theSolution = theScenario.Find("Test");

            theBuilder = new NugetPlanBuilder();

            var request = new NugetPlanRequest
            {
                Solution     = theSolution,
                Dependency   = new Dependency("Bottles", "1.1.0.0", UpdateMode.Fixed),
                Operation    = OperationType.Install,
                ForceUpdates = false,
                Project      = "Test"
            };

            thePlan = theBuilder.PlanFor(request);
        }
        public void SetUp()
        {
            FeedScenario.Create(scenario =>
            {
                scenario.For(Feed.NuGetV2)
                // Omitting this effectively says "FubuCore" doesn't exist in the feed
                // so we force it to use the local version instead
                //.Add("FubuCore", "1.2.0.0")
                .Add("Bottles", "1.1.0.0")
                .ConfigureRepository(nuget =>
                {
                    nuget.ConfigurePackage("Bottles", "1.1.0.0", bottles => bottles.DependsOn("FubuCore", "1.2.0.0"));
                });
            });

            theScenario = SolutionScenario.Create(scenario =>
            {
                scenario.Solution("Test", test =>
                {
                    test.SolutionDependency("FubuCore", "1.2.0.0", UpdateMode.Float);
                    test.ProjectDependency("Test", "FubuCore");
                    test.LocalDependency("FubuCore", "1.2.0.0");
                });
            });

            theSolution = theScenario.Find("Test");

            theBuilder = new NugetPlanBuilder();

            var request = new NugetPlanRequest
            {
                Solution   = theSolution,
                Dependency = new Dependency("Bottles", "1.1.0.0", UpdateMode.Fixed),
                Operation  = OperationType.Install,
                Project    = "Test"
            };

            thePlan = theBuilder.PlanFor(request);
        }