예제 #1
0
        public async void can_create_job_with_prefill()
        {
            JobsClient jobs = new JobsClient(ACCESS_KEY, SECRET_KEY, TenantName.ONEBLINK_TEST);

            JobDetail jobDetail = new JobDetail("TITLE-01");

            jobDetail.key         = "KEY-01";
            jobDetail.description = "DESCRIPTION-01";
            jobDetail.type        = "TYPE-01";

            TestJobPrefillData preFill = new TestJobPrefillData();

            preFill.fieldA = "abc";
            preFill.fieldB = "def";
            preFill.fieldC = "ghi";

            Job newJob = new Job(
                details: jobDetail,
                formId: formId,
                username: "******"
                );

            Job response = await jobs.CreateJob <TestJobPrefillData>(newJob, preFill);

            Assert.NotNull(response);
            Assert.NotNull(response.id);

            await jobs.DeleteJob(response.id);
        }
예제 #2
0
        public async void can_create_job_with_priority()
        {
            JobsClient jobs = new JobsClient(ACCESS_KEY, SECRET_KEY, TenantName.ONEBLINK_TEST);

            JobDetail jobDetail = new JobDetail(title: "TITLE-01", priority: 1);

            Job newJob = new Job(details: jobDetail, formId: formId, username: "******");

            Job response = await jobs.CreateJob(newJob);

            Assert.NotNull(response);
            Assert.NotNull(response.id);

            await jobs.DeleteJob(response.id);
        }
예제 #3
0
        public async void can_delete_job()
        {
            JobsClient jobs = new JobsClient(ACCESS_KEY, SECRET_KEY, TenantName.ONEBLINK_TEST);

            JobDetail jobDetail = new JobDetail("TITLE-01");

            Job newJob = new Job(
                details: jobDetail,
                formId: formId,
                username: "******"
                );

            Job job = await jobs.CreateJob(newJob);

            await jobs.DeleteJob(job.id);
        }
예제 #4
0
        public async void throws_error_if_title_empty()
        {
            try
            {
                JobsClient jobs = new JobsClient(ACCESS_KEY, SECRET_KEY, TenantName.ONEBLINK_TEST);

                JobDetail jobDetail = new JobDetail("");

                Job newJob = new Job(
                    details: jobDetail,
                    formId: formId,
                    username: "******"
                    );

                Job job = await jobs.CreateJob(newJob);
            }
            catch (Exception ex)
            {
                Assert.NotNull(ex);
            }
        }
예제 #5
0
        public async void can_create_job_without_prefill()
        {
            JobsClient jobs = new JobsClient(ACCESS_KEY, SECRET_KEY, TenantName.ONEBLINK_TEST);

            JobDetail jobDetail = new JobDetail("TITLE-01");

            jobDetail.key         = "KEY-01";
            jobDetail.description = "DESCRIPTION-01";
            jobDetail.type        = "TYPE-01";

            Job newJob = new Job(
                details: jobDetail,
                formId: formId,
                username: "******"
                );
            Job response = await jobs.CreateJob(newJob);

            Assert.NotNull(response);
            Assert.NotNull(response.id);

            await jobs.DeleteJob(response.id);
        }