public void Parse(InstallSection installSection, InstallData expected) { var parser = new InstallSectionParser(); var actual = parser.Parse(installSection); actual.Should().BeEquivalentTo(expected, o => o.WithStrictOrdering()); }
public void Merge(InstallSection installSection, InstallData defaults, InstallData[] parentInstalls, InstallData expected) { var parser = new InstallSectionParser(); var merger = new InstallSectionMerger(); var currentConfigInstallData = parser.Parse(installSection, defaults?.CurrentConfigurationInstallFiles); var actual = merger.Merge(currentConfigInstallData, defaults, parentInstalls); actual.Should().BeEquivalentTo(expected, o => o.WithStrictOrdering()); }
private ModuleDefaultsParser GetParser() { var depSectionItemParser = new DepSectionItemParser(); var depsSectionParser = new DepsSectionParser(depSectionItemParser); var installSectionParser = new InstallSectionParser(); var buildSectionParser = new BuildSectionParser(); var hooksSectionParser = new HooksSectionParser(); var settingsSectionParser = new SettingsSectionParser(); var moduleDefaultsParser = new ModuleDefaultsParser(hooksSectionParser, depsSectionParser, settingsSectionParser, buildSectionParser, installSectionParser); return(moduleDefaultsParser); }
private static ModuleYamlParser Create() { var configSectionTitleParser = new ConfigSectionTitleParser(); var depLineParser = new DepSectionItemParser(); var depsSectionParser = new DepsSectionParser(depLineParser); var installSectionParser = new InstallSectionParser(); var buildSectionParser = new BuildSectionParser(); var configSectionParser = new ConfigSectionParser(configSectionTitleParser, installSectionParser, depsSectionParser, buildSectionParser); var hooksSectionParser = new HooksSectionParser(); var settingsSectionParser = new SettingsSectionParser(); var moduleDefaultsParser = new ModuleDefaultsParser(hooksSectionParser, depsSectionParser, settingsSectionParser, buildSectionParser, installSectionParser); var depsSectionMerger = new DepsSectionMerger(); var installSectionMerger = new InstallSectionMerger(); return(new ModuleYamlParser( moduleDefaultsParser, configSectionParser, installSectionMerger, depsSectionMerger )); }