Exemple #1
0
        public void TestSimpleDepsWithForce()
        {
            AddBuildScript("kanso.sln", null);
            var deps = new List <Dep> {
                new("A@branch"), new("B"), new("C@conf"), new("D/conf@branch")
            };

            AddDeps(deps, null, "%CURRENT_BRANCH%");
            new ConvertSpecCommand().Run(new[] { "convert-spec" });

            var yamlDeps = Yaml.DepsParser("module").Get();

            CollectionAssert.AreEqual(deps, yamlDeps.Deps);
            Assert.AreEqual("$CURRENT_BRANCH", yamlDeps.Force.Single());
        }
Exemple #2
0
        public void TestSimpleWithTwoConfigs()
        {
            var deps = new List <Dep> {
                new("A"), new("B"), new("C")
            };
            var depsClient = deps.Take(2).ToList();

            AddDeps(deps);
            AddDeps(depsClient, "client");
            AddBuildScript("kanso.sln", null);
            AddBuildScript("kanso.sln", "client");
            AddSpec(new List <string> {
                "client"
            });

            new ConvertSpecCommand().Run(new[] { "convert-spec" });
            var yamlDeps       = Yaml.DepsParser("module").Get();
            var yamlDepsClient = Yaml.DepsParser("module").Get("client");

            CollectionAssert.AreEqual(deps, yamlDeps.Deps);
            CollectionAssert.AreEqual(depsClient, yamlDepsClient.Deps);
        }
Exemple #3
0
        public void TestWithDepsOnOff()
        {
            var deps = new List <Dep> {
                new("A"), new("B"), new("C")
            };
            var depsClient = new List <Dep> {
                new("B/client"), new("C")
            };

            AddDeps(deps);
            AddDeps(depsClient, "client");
            AddBuildScript("kanso.sln", null);
            AddBuildScript("kanso.sln", "client");
            AddSpec(new List <string> {
                "client"
            });

            new ConvertSpecCommand().Run(new[] { "convert-spec" });
            var yamlDeps       = Yaml.DepsParser("module").Get();
            var yamlDepsClient = Yaml.DepsParser("module").Get("client");

            CollectionAssert.AreEquivalent(deps, yamlDeps.Deps);
            CollectionAssert.AreEquivalent(depsClient, yamlDepsClient.Deps);
        }