public void SetUp()
        {
            theScenario = SolutionScenario.Create(scenario =>
            {
                scenario.Solution("FubuCore", test =>
                {
                    // No, I don't like this name more. I'm just making it complicated
                    test.Publishes("FubuFoundation", x => x.Assembly("FubuCore.dll"));
                    test.Publishes("FubuCore.Interfaces", x => x.Assembly("FubuCore.Interfaces.dll", "FubuCore"));
                });
            });

            theOutputDir = theScenario.CreateDirectory("output");

            theSolution = theScenario.Find("FubuCore");
            theSolution.AddNuspec(new NuspecMap { PackageId = "FubuCore.Interfaces", PublishedBy = "FubuCore" });
            theSolution.AddNuspec(new NuspecMap { PackageId = "FubuFoundation", PublishedBy = "FubuCore", DependsOn = "FubuCore.Interfaces" });

            RippleOperation
                .With(theSolution)
                .Execute<CreatePackagesInput, CreatePackagesCommand>(x =>
                {
                    x.UpdateDependenciesFlag = true;
                    x.DestinationFlag = theOutputDir;
                    x.VersionFlag = "1.1.0.0";
                });
        }
        public void SetUp()
        {
            theScenario = SolutionScenario.Create(scenario =>
            {
                scenario.Solution("Test", test =>
                    {
                        test.Publishes("SomethingElse");
                        test.Publishes("SomeProject");

                        test.SolutionDependency("FubuCore", "1.0.0.0", UpdateMode.Fixed);
                        test.ProjectDependency("SomeProject", "FubuCore");
                        test.ProjectDependency("Something", "FubuCore");
                    });
            });

            theSolution = theScenario.Find("Test");
            theSolution.AddNuspec(new NuspecMap { PackageId = "SomethingElse", PublishedBy = "Something" });

            theFinder = new NuspecTemplateFinder();
        }
Ejemplo n.º 3
0
        public void persists_and_retrieves_the_solution()
        {
            var solution = new Solution
            {
                Name = "Test",
                Feeds = new[] { Feed.NuGetV2, Feed.NuGetV1 },
                Nugets = new[] { new Dependency("FubuCore", "1.0.1.0") }
            };

            var group = new DependencyGroup { Name = "Test"};
            group.Add(new GroupedDependency("FubuCore"));
            solution.AddGroup(group);

            solution.AddDependency(new Dependency("Bottles", "1.0.0.0")
            {
                VersionConstraint = VersionConstraint.DefaultFloat
            });

            solution.AddNuspec(new NuspecMap { PackageId = "Temp", PublishedBy = "Test" });

            solution.Ignore("Rhino.ServiceBus.dll", "Esent.Interop.dll");

            var registry = new RippleBlockRegistry();
            var solutionSettings = registry.SettingsFor(typeof (Solution));

            CheckObjectBlockPersistence
                .ForSolution(solution)
                .VerifyProperties(property =>
                {
                    if (!property.CanWrite)
                        return false;

                    if (solutionSettings.ShouldIgnore(solution, new SingleProperty(property)))
                        return false;

                    return true;
                });
        }