Exemple #1
0
        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());
        }
Exemple #3
0
        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);
        }
Exemple #4
0
        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
                       ));
        }