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()); }
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); }
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); }