public void When_there_is_one_run_and_one_user_agent_and_the_run_user_agent_has_not_started()
        {
            run = new Run(new Job("job"){Id = 4}, "run", "url"){Id = 1};
            userAgent = new UserAgent("chrome", "chrome", null) {Id = 2};
            runUserAgent = new RunUserAgent(run, userAgent, 1){Id = 3};

            result = runUserAgent.ToResult();
            var results = new[]
                {
                    result
                };

            status = new JobStatusResult(results);
        }
Exemple #2
0
 public static async void UpdateStatus(JobStatusResult status)
 {
     await GetJobClients(status.JobId).statusChanged(status);
 }
        public void When_there_are_three_runs_and_four_user_agents_and_the_run_user_agents_have_not_started()
        {
            run1 = new Run(new Job("job") { Id = 1 }, "run a", "url a") { Id = 2 };
            run2 = new Run(new Job("job") { Id = 1 }, "run b", "url b") { Id = 3 };
            run3 = new Run(new Job("job") { Id = 1 }, "run c", "url c") { Id = 4 };
            run4 = new Run(new Job("job") { Id = 1 }, "run d", "url d") { Id = 5 };

            chrome = new UserAgent("chrome", "chrome", null) { Id = 14 };
            ie6 = new UserAgent("ie", "ie 6", 6) { Id = 11 };
            ie7 = new UserAgent("ie", "ie 7", 7) { Id = 12 };
            ie8 = new UserAgent("ie", "ie 8", 8) { Id = 13 };

            status = new JobStatusResult(GetResults(new[] { run4, run2, run1, run3, }, new[] { chrome, ie6, ie7, ie8 }));
        }
        public void When_there_is_one_runs_and_four_user_agents_and_the_run_user_agents_have_not_started()
        {
            run = new Run(new Job("job") { Id = 1 }, "run", "url") { Id = 2 };

            chrome = new UserAgent("chrome", "chrome", null) { Id = 3 };
            ie6 = new UserAgent("ie", "ie 6", 6) { Id = 11 };
            ie7 = new UserAgent("ie", "ie 7", 7) { Id = 12 };
            ie8 = new UserAgent("ie", "ie 8", 8) { Id = 13 };

            chrome_run = new RunUserAgent(run, chrome, 1) { Id = 101 };
            ie6_run = new RunUserAgent(run, ie6, 1) { Id = 102 };
            ie7_run = new RunUserAgent(run, ie7, 1) { Id = 103 };
            ie8_run = new RunUserAgent(run, ie8, 1) { Id = 104 };

            result1 = chrome_run.ToResult();
            result2 = ie6_run.ToResult();
            result3 = ie7_run.ToResult();
            result4 = ie8_run.ToResult();

            var results = new[]
                {
                    result3,
                    result2,
                    result4,
                    result1
                };

            status = new JobStatusResult(results);
        }