public void TestGetDefaultConfigName() { const string text = @" default: sdk > client: client *default:"; Assert.AreEqual("client", YamlFromText.ConfigurationParser(text).GetDefaultConfigurationName()); }
public void TestConfigNotExists() { const string text = @" default: sdk > client: client *default:"; Assert.IsFalse(YamlFromText.ConfigurationParser(text).ConfigurationExists("release")); }
public void TestConfigExists() { const string text = @" default: sdk > client: client *default:"; Assert.IsTrue(YamlFromText.ConfigurationParser(text).ConfigurationExists("sdk")); }
public void TestGetConfigurationsRealNames() { const string text = @" default: sdk > client: client *default:"; Assert.AreEqual(new[] { "sdk", "client" }.ToList(), YamlFromText.ConfigurationParser(text).GetConfigurations()); }
public void TestGetParentConfigurationsIsNull() { const string text = @" default: full-build > sdk, client *default: sdk > client: client:"; Assert.IsNull(YamlFromText.ConfigurationParser(text).GetParentConfigurations("client")); }
public void TestGetParentConfigurations() { const string text = @" default: full-build > sdk, client *default: sdk > client: client:"; Assert.AreEqual(new[] { "sdk", "client" }.ToList(), YamlFromText.ConfigurationParser(text).GetParentConfigurations("full-build")); }
public void TestGetConfigurationHierarchy() { const string text = @" default: full-build > sdk, client *default: sdk > client: client: notests:"; var hierarchy = YamlFromText.ConfigurationParser(text).GetConfigurationsHierarchy(); Assert.NotNull(hierarchy); Assert.AreEqual(2, hierarchy["client"].Count); Assert.AreEqual(0, hierarchy["full-build"].Count); Assert.AreEqual(1, hierarchy["sdk"].Count); Assert.AreEqual(0, hierarchy["notests"].Count); }