Example #1
0
        public void ClearedStatusCheck()
        {
            JobExecutionServiceStatus status;

            StartService();
            status = new GetServiceStatusController().Get();
            status.ServiceStatus.ShouldEqual(ServiceControllerStatus.Running);

            new StopServiceController().Get();
            status = new GetServiceStatusController().Get();
            status.ServiceStatus.ShouldEqual(ServiceControllerStatus.Stopped);

            status.JobCount.ShouldEqual(0);
            status.ErroredJobCount.ShouldEqual(0);
        }
Example #2
0
        private void TestAJob(string jobId)
        {
            var jobStatus = new GetJobStatusController().Get(jobId);
            jobStatus.ShouldEqual(JobStatus.Queued);

            StartService();

            int repeatTime = 0;
            do
            {
                jobStatus = new GetJobStatusController().Get(jobId);
                if (jobStatus == JobStatus.InvalidJobId)
                    break;

                Thread.Sleep(100);
            } while (repeatTime++ < 50);

            var status = new GetServiceStatusController().Get();
            status.JobCount.ShouldEqual(0);

            jobStatus = new GetJobStatusController().Get(jobId);
            jobStatus.ShouldEqual(JobStatus.Executed);
        }