示例#1
0
        public async Task Test01_SequencerPreRunSetupTest()
        {
            AutomationSequencer sequencer = new AutomationSequencer()
            {
                AutomationRunnerSettings = this.AutomationRunnerSettings,
                CancellationToken        = nullToken,
                DatabaseAutomationRunner = null,
                DatabaseManager          = null
            };

            Assert.IsTrue(await sequencer.LoadBranchesListAsync());
            Assert.IsTrue(await sequencer.LoadRootDocumentAsync());
            Assert.IsTrue(sequencer.ParseRootDocumentAsync());
        }
        private async void RelhaxWindow_Loaded(object sender, RoutedEventArgs e)
        {
            databaseManager     = new DatabaseManager(ModpackSettings, CommandLineSettings);
            AutomationSequencer = new AutomationSequencer()
            {
                AutomationRunnerSettings = this.AutomationSettings, DatabaseAutomationRunner = this, DatabaseManager = databaseManager
            };

            LoadSettingsToUI();

            //init the log viewer window
            FocusOrCreateLogWindow(AutomationSettings.OpenLogWindowOnStartup);

            await LoadAutomationSequencerAsync();

            Init = false;
        }
        public async Task Test01_GetAutomationRepoBranchesTest()
        {
            AutomationSequencer sequencer = new AutomationSequencer()
            {
                AutomationRunnerSettings      = this.AutomationRunnerSettings,
                AutomationRunMode             = AutomationRunMode.Interactive,
                WoTClientVersion              = "TODO",
                WoTModpackOnlineFolderVersion = "TODO"
            };

            throw new BadMemeException("you should, like, finish this");

            /*
             * //TODO: dynamically get this from the beta db?
             * ApplicationSettings.WoTModpackOnlineFolderVersion = "1.10.0";
             * ApplicationSettings.WoTClientVersion = "1.10.0.4";
             */

            await sequencer.LoadBranchesListAsync();

            await sequencer.LoadRootDocumentAsync();

            await sequencer.LoadGlobalMacrosAsync();

            List <DatabasePackage> DatabasePackages = new List <DatabasePackage>();

            DatabasePackages.Add(new SelectablePackage()
            {
                UID            = "123456789ABCD",
                PackageName    = "Some_rofl_op_russian_medium",
                ParentCategory = new Category()
                {
                    Name = "Cat_name"
                },
                Level = 0
            });
            bool loadAutomationSequencesResult = await sequencer.LoadAutomationSequencesAsync(DatabasePackages);

            bool parseAutomationSequencesResult = sequencer.ParseAutomationSequences();
            bool runSequencesResult             = await sequencer.RunSequencesAsync();

            //Assert.IsFalse(string.IsNullOrEmpty(LatestSupportedWoTVersion));
            //Assert.IsFalse(string.IsNullOrEmpty(LatestSupportedWoTVersion));
        }
示例#4
0
        public async Task Test01_GetAutomationRepoBranchesTest()
        {
            AutomationSequencer sequencer = new AutomationSequencer()
            {
                AutomationRunnerSettings = new AutomationRunnerSettings()
                {
                    SelectedBranch = "master" // is default
                }
            };

            await sequencer.LoadBranchesListAsync();

            await sequencer.LoadRootDocumentAsync();

            await sequencer.LoadGlobalMacrosAsync();

            //Assert.IsFalse(string.IsNullOrEmpty(LatestSupportedWoTVersion));
            //Assert.IsFalse(string.IsNullOrEmpty(LatestSupportedWoTVersion));
        }