Example #1
0
        private void nuspecs(XElement document, Solution solution)
        {
            var nuspecs = document.Element("Nuspecs");

            if (nuspecs == null)
            {
                return;
            }

            var maps = new List <NuspecMap>();

            foreach (var element in nuspecs.Descendants())
            {
                var map = new NuspecMap();
                fillProperties(element, map);

                var file = element.Attribute("File");
                if (file != null)
                {
                    map.PackageId = file.Value;
                }

                var project = element.Attribute("Project");
                if (project != null)
                {
                    map.PublishedBy = project.Value;
                }

                maps.Add(map);
            }

            solution.Nuspecs = maps;
        }
Example #2
0
        public void blows_up_when_a_nuspec_dependency_does_not_exist()
        {
            var map = new NuspecMap
            {
                PackageId   = "Something",
                PublishedBy = "Something",
                DependsOn   = "SomeProject2"
            };

            Exception <InvalidOperationException> .ShouldBeThrownBy(() => map.ToSpec(theSolution));
        }
Example #3
0
        public void maps_the_nuspec_dependencies()
        {
            var map = new NuspecMap
            {
                PackageId   = "AnotherProject",
                PublishedBy = "AnotherProject",
                DependsOn   = "Something"
            };

            var spec = map.ToSpec(theSolution);

            spec.Dependencies.Single().Name.ShouldEqual("Something");
        }
Example #4
0
        public void SetUp()
        {
            theScenario = SolutionGraphScenario.Create(scenario =>
            {
                scenario.Solution("Test", test =>
                {
                    test.Publishes("Something");
                    test.Publishes("SomeProject");

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

            theSolution = theScenario.Find("Test");

            theMap = new NuspecMap
            {
                File    = "Something.nuspec",
                Project = "SomeProject"
            };
        }
Example #5
0
        public void SetUp()
        {
            theScenario = SolutionScenario.Create(scenario =>
            {
                scenario.Solution("Test", test =>
                {
                    test.Publishes("Something");
                    test.Publishes("SomeProject");
                    test.Publishes("AnotherProject");

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

            theSolution = theScenario.Find("Test");

            theMap = new NuspecMap
            {
                PackageId   = "Something",
                PublishedBy = "SomeProject"
            };
        }
Example #6
0
        private void nuspecs(XElement document, Solution solution)
        {
            var nuspecs = document.Element("Nuspecs");
            if (nuspecs == null) return;

            var maps = new List<NuspecMap>();
            foreach (var element in nuspecs.Descendants())
            {
                var map = new NuspecMap();
                fillProperties(element, map);

                var file = element.Attribute("File");
                if (file != null)
                {
                    map.PackageId = file.Value;
                }

                var project = element.Attribute("Project");
                if (project != null)
                {
                    map.PublishedBy = project.Value;
                }

                maps.Add(map);
            }

            solution.Nuspecs = maps;
        }
Example #7
0
        private void nuspecs(XElement document, Solution solution)
        {
            var nuspecs = document.Element("Nuspecs");
            if (nuspecs == null) return;

            var maps = new List<NuspecMap>();
            foreach (var element in nuspecs.Descendants())
            {
                var map = new NuspecMap();
                fillProperties(element, map);

                maps.Add(map);
            }

            solution.Nuspecs = maps;
        }