Search in sources :

Example 1 with UpdateJobRequest

use of com.google.cloud.scheduler.v1beta1.UpdateJobRequest in project java-talent by googleapis.

the class ITSystemTest method updateJobTest.

@Test
public void updateJobTest() {
    String department = "Information technology";
    Job updateJob = job.toBuilder().setDepartment(department).build();
    UpdateJobRequest request = UpdateJobRequest.newBuilder().setJob(updateJob).build();
    Job actual = jobServiceClient.updateJob(request);
    assertEquals(job.getName(), actual.getName());
    assertEquals(job.getCompany(), actual.getCompany());
    assertEquals(job.getRequisitionId(), actual.getRequisitionId());
    assertEquals(job.getTitle(), actual.getTitle());
    assertEquals(job.getDescription(), actual.getDescription());
    assertEquals(job.getApplicationInfo(), actual.getApplicationInfo());
    assertEquals(job.getAddressesCount(), actual.getAddressesCount());
    assertEquals(job.getLanguageCode(), actual.getLanguageCode());
    assertEquals(department, actual.getDepartment());
}
Also used : UpdateJobRequest(com.google.cloud.talent.v4beta1.UpdateJobRequest) Job(com.google.cloud.talent.v4beta1.Job) Test(org.junit.Test)

Example 2 with UpdateJobRequest

use of com.google.cloud.scheduler.v1beta1.UpdateJobRequest in project java-scheduler by googleapis.

the class ITSystemTest method updateJobTest.

@Test
public void updateJobTest() {
    String timeZone = "PST";
    String schedule = "25 8 * * *";
    Job updateJob = Job.newBuilder().setName(JOB_NAME).setPubsubTarget(PUB_SUB_TARGET).setSchedule(schedule).setTimeZone(timeZone).build();
    UpdateJobRequest updateJobRequest = UpdateJobRequest.newBuilder().setJob(updateJob).build();
    Job job = client.updateJob(updateJobRequest);
    assertEquals(JOB_NAME, job.getName());
    assertEquals(PUB_SUB_TARGET, job.getPubsubTarget());
    assertEquals(Job.State.ENABLED, job.getState());
    assertEquals(timeZone, job.getTimeZone());
    assertEquals(schedule, job.getSchedule());
}
Also used : ByteString(com.google.protobuf.ByteString) UpdateJobRequest(com.google.cloud.scheduler.v1beta1.UpdateJobRequest) Job(com.google.cloud.scheduler.v1beta1.Job) Test(org.junit.Test)

Example 3 with UpdateJobRequest

use of com.google.cloud.scheduler.v1beta1.UpdateJobRequest in project java-scheduler by googleapis.

the class ITSystemTest method updateJobTest.

@Test
public void updateJobTest() {
    String timeZone = "PST";
    String schedule = "25 8 * * *";
    Job updateJob = Job.newBuilder().setName(JOB_NAME).setPubsubTarget(PUB_SUB_TARGET).setSchedule(schedule).setTimeZone(timeZone).build();
    UpdateJobRequest updateJobRequest = UpdateJobRequest.newBuilder().setJob(updateJob).build();
    Job job = client.updateJob(updateJobRequest);
    assertEquals(JOB_NAME, job.getName());
    assertEquals(PUB_SUB_TARGET, job.getPubsubTarget());
    assertEquals(Job.State.ENABLED, job.getState());
    assertEquals(timeZone, job.getTimeZone());
    assertEquals(schedule, job.getSchedule());
}
Also used : ByteString(com.google.protobuf.ByteString) UpdateJobRequest(com.google.cloud.scheduler.v1.UpdateJobRequest) Job(com.google.cloud.scheduler.v1.Job) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)3 ByteString (com.google.protobuf.ByteString)2 Job (com.google.cloud.scheduler.v1.Job)1 UpdateJobRequest (com.google.cloud.scheduler.v1.UpdateJobRequest)1 Job (com.google.cloud.scheduler.v1beta1.Job)1 UpdateJobRequest (com.google.cloud.scheduler.v1beta1.UpdateJobRequest)1 Job (com.google.cloud.talent.v4beta1.Job)1 UpdateJobRequest (com.google.cloud.talent.v4beta1.UpdateJobRequest)1