use of com.google.cloud.scheduler.v1.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());
}
use of com.google.cloud.scheduler.v1.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());
}
use of com.google.cloud.scheduler.v1.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());
}
Aggregations