public Dictionary <string, DepsData> OldDepsParser() { var parser = new DepsYamlParser("fakename", Content); var configs = parser.GetConfigurations(); return(configs.ToDictionary(c => c, c => parser.Get(c))); }
public void EnsureEquivalentConfigurations(string path) { var text = pathToContentMap[path]; var parser = ModuleYamlParserFactory.Get(); var depsSectionParser = new DepsYamlParser("fake", text); var md = parser.Parse(text); var oldConfigSet = depsSectionParser.GetConfigurations(); var newConfigSet = md.AllConfigurations.Keys.ToArray(); newConfigSet.Should().BeEquivalentTo(oldConfigSet); var oldDefaultConfig = depsSectionParser.GetDefaultConfigurationName(); var newDefaultConfig = md.FindDefaultConfiguration()?.Name ?? "full-build"; newDefaultConfig.Should().BeEquivalentTo(oldDefaultConfig); }
public void OldYamlParsersDoNotThrow(string path) { var text = pathToContentMap[path]; var depsSectionParser = new DepsYamlParser("fake", text); var installSectionParser = new InstallYamlParser("fake", text); var buildSectionParser = new BuildYamlParser("fake", text); var configs = depsSectionParser.GetConfigurations(); foreach (var config in configs) { Assert.DoesNotThrow(() => { depsSectionParser.Get(config); installSectionParser.Get(config); buildSectionParser.Get(config); }); } }