Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
- name: Compile
run: ./gradlew compileJava

- name: Check formatting
run: ./gradlew spotlessCheck

test:
needs: [ compile ]
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public final class DateTimeSerializationTest {

@Test
public void utcDatetimeSerializesWithZuluOffset() throws Exception {
Employee employee = ObjectMappers.JSON_MAPPER.readValue(
"{\"modified_at\":\"2026-01-15T09:30:00Z\"}", Employee.class);
Employee employee =
ObjectMappers.JSON_MAPPER.readValue("{\"modified_at\":\"2026-01-15T09:30:00Z\"}", Employee.class);

assertTrue(employee.getModifiedAt().isPresent());
String serialized = ObjectMappers.JSON_MAPPER.writeValueAsString(employee);
Expand All @@ -21,12 +21,10 @@ public void utcDatetimeSerializesWithZuluOffset() throws Exception {

@Test
public void datetimeRoundTripPreservesInstant() throws Exception {
Employee employee = ObjectMappers.JSON_MAPPER.readValue(
"{\"modified_at\":\"2026-01-15T09:30:00-05:00\"}", Employee.class);
Employee employee =
ObjectMappers.JSON_MAPPER.readValue("{\"modified_at\":\"2026-01-15T09:30:00-05:00\"}", Employee.class);

OffsetDateTime modifiedAt = employee.getModifiedAt().get();
assertEquals(
OffsetDateTime.parse("2026-01-15T09:30:00-05:00").toInstant(),
modifiedAt.toInstant());
assertEquals(OffsetDateTime.parse("2026-01-15T09:30:00-05:00").toInstant(), modifiedAt.toInstant());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ public void productionEuRoutesToEuHost() {

@Test
public void customUrlRoundTrips() {
assertEquals("http://localhost:8080", Environment.custom("http://localhost:8080").getUrl());
assertEquals(
"http://localhost:8080",
Environment.custom("http://localhost:8080").getUrl());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import okhttp3.HttpUrl;
import org.junit.jupiter.api.Test;
Expand Down
48 changes: 30 additions & 18 deletions src/test/java/com/merge/api/integration/AtsIntegrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,42 +39,49 @@ void setUp() {
@Test
void activities() {
smokeListAndRetrieve(
client.ats().activities().list(), id -> client.ats().activities().retrieve(id));
client.ats().activities().list(),
id -> client.ats().activities().retrieve(id));
}

@Test
void applications() {
smokeListAndRetrieve(
client.ats().applications().list(), id -> client.ats().applications().retrieve(id));
client.ats().applications().list(),
id -> client.ats().applications().retrieve(id));
}

@Test
void attachments() {
smokeListAndRetrieve(
client.ats().attachments().list(), id -> client.ats().attachments().retrieve(id));
client.ats().attachments().list(),
id -> client.ats().attachments().retrieve(id));
}

@Test
void candidates() {
smokeListAndRetrieve(
client.ats().candidates().list(), id -> client.ats().candidates().retrieve(id));
client.ats().candidates().list(),
id -> client.ats().candidates().retrieve(id));
}

@Test
void departments() {
smokeListAndRetrieve(
client.ats().departments().list(), id -> client.ats().departments().retrieve(id));
client.ats().departments().list(),
id -> client.ats().departments().retrieve(id));
}

@Test
void eeocs() {
smokeListAndRetrieve(client.ats().eeocs().list(), id -> client.ats().eeocs().retrieve(id));
smokeListAndRetrieve(
client.ats().eeocs().list(), id -> client.ats().eeocs().retrieve(id));
}

@Test
void interviews() {
smokeListAndRetrieve(
client.ats().interviews().list(), id -> client.ats().interviews().retrieve(id));
client.ats().interviews().list(),
id -> client.ats().interviews().retrieve(id));
}

@Test
Expand All @@ -87,39 +94,46 @@ void jobInterviewStages() {
@Test
void jobPostings() {
smokeListAndRetrieve(
client.ats().jobPostings().list(), id -> client.ats().jobPostings().retrieve(id));
client.ats().jobPostings().list(),
id -> client.ats().jobPostings().retrieve(id));
}

@Test
void jobs() {
smokeListAndRetrieve(client.ats().jobs().list(), id -> client.ats().jobs().retrieve(id));
smokeListAndRetrieve(
client.ats().jobs().list(), id -> client.ats().jobs().retrieve(id));
}

@Test
void offers() {
smokeListAndRetrieve(client.ats().offers().list(), id -> client.ats().offers().retrieve(id));
smokeListAndRetrieve(
client.ats().offers().list(), id -> client.ats().offers().retrieve(id));
}

@Test
void offices() {
smokeListAndRetrieve(client.ats().offices().list(), id -> client.ats().offices().retrieve(id));
smokeListAndRetrieve(
client.ats().offices().list(), id -> client.ats().offices().retrieve(id));
}

@Test
void rejectReasons() {
smokeListAndRetrieve(
client.ats().rejectReasons().list(), id -> client.ats().rejectReasons().retrieve(id));
client.ats().rejectReasons().list(),
id -> client.ats().rejectReasons().retrieve(id));
}

@Test
void scorecards() {
smokeListAndRetrieve(
client.ats().scorecards().list(), id -> client.ats().scorecards().retrieve(id));
client.ats().scorecards().list(),
id -> client.ats().scorecards().retrieve(id));
}

@Test
void users() {
smokeListAndRetrieve(client.ats().users().list(), id -> client.ats().users().retrieve(id));
smokeListAndRetrieve(
client.ats().users().list(), id -> client.ats().users().retrieve(id));
}

@Test
Expand All @@ -134,8 +148,7 @@ void applicationsExpand() {
.list(ApplicationsListRequest.builder()
.pageSize(5)
.expand(List.of(
ApplicationsListRequestExpandItem.CANDIDATE,
ApplicationsListRequestExpandItem.OFFERS))
ApplicationsListRequestExpandItem.CANDIDATE, ApplicationsListRequestExpandItem.OFFERS))
.build()));
}

Expand All @@ -158,8 +171,7 @@ void interviewsExpand() {
.list(InterviewsListRequest.builder()
.pageSize(5)
.expand(List.of(
InterviewsListRequestExpandItem.APPLICATION,
InterviewsListRequestExpandItem.ORGANIZER))
InterviewsListRequestExpandItem.APPLICATION, InterviewsListRequestExpandItem.ORGANIZER))
.build()));
}

Expand Down
24 changes: 14 additions & 10 deletions src/test/java/com/merge/api/integration/CrmIntegrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,20 @@ void engagementTypes() {
@Test
void engagements() {
smokeListAndRetrieve(
client.crm().engagements().list(), id -> client.crm().engagements().retrieve(id));
client.crm().engagements().list(),
id -> client.crm().engagements().retrieve(id));
}

@Test
void leads() {
smokeListAndRetrieve(client.crm().leads().list(), id -> client.crm().leads().retrieve(id));
smokeListAndRetrieve(
client.crm().leads().list(), id -> client.crm().leads().retrieve(id));
}

@Test
void notes() {
smokeListAndRetrieve(client.crm().notes().list(), id -> client.crm().notes().retrieve(id));
smokeListAndRetrieve(
client.crm().notes().list(), id -> client.crm().notes().retrieve(id));
}

@Test
Expand All @@ -87,17 +90,20 @@ void opportunities() {

@Test
void stages() {
smokeListAndRetrieve(client.crm().stages().list(), id -> client.crm().stages().retrieve(id));
smokeListAndRetrieve(
client.crm().stages().list(), id -> client.crm().stages().retrieve(id));
}

@Test
void tasks() {
smokeListAndRetrieve(client.crm().tasks().list(), id -> client.crm().tasks().retrieve(id));
smokeListAndRetrieve(
client.crm().tasks().list(), id -> client.crm().tasks().retrieve(id));
}

@Test
void users() {
smokeListAndRetrieve(client.crm().users().list(), id -> client.crm().users().retrieve(id));
smokeListAndRetrieve(
client.crm().users().list(), id -> client.crm().users().retrieve(id));
}

@Test
Expand All @@ -117,8 +123,7 @@ void engagementsExpand() {
.list(EngagementsListRequest.builder()
.pageSize(5)
.expand(List.of(
EngagementsListRequestExpandItem.CONTACTS,
EngagementsListRequestExpandItem.OWNER))
EngagementsListRequestExpandItem.CONTACTS, EngagementsListRequestExpandItem.OWNER))
.build()));
}

Expand Down Expand Up @@ -149,8 +154,7 @@ void opportunitiesExpand() {
.list(OpportunitiesListRequest.builder()
.pageSize(5)
.expand(List.of(
OpportunitiesListRequestExpandItem.ACCOUNT,
OpportunitiesListRequestExpandItem.OWNER))
OpportunitiesListRequestExpandItem.ACCOUNT, OpportunitiesListRequestExpandItem.OWNER))
.build()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ void drives() {
@Test
void files() {
smokeListAndRetrieve(
client.fileStorage().files().list(), id -> client.fileStorage().files().retrieve(id));
client.fileStorage().files().list(),
id -> client.fileStorage().files().retrieve(id));
}

@Test
Expand All @@ -60,7 +61,8 @@ void groups() {
@Test
void users() {
smokeListAndRetrieve(
client.fileStorage().users().list(), id -> client.fileStorage().users().retrieve(id));
client.fileStorage().users().list(),
id -> client.fileStorage().users().retrieve(id));
}

@Test
Expand All @@ -80,8 +82,7 @@ void foldersExpand() {
.list(FoldersListRequest.builder()
.pageSize(5)
.expand(List.of(
FoldersListRequestExpandItem.PERMISSIONS,
FoldersListRequestExpandItem.PARENT_FOLDER))
FoldersListRequestExpandItem.PERMISSIONS, FoldersListRequestExpandItem.PARENT_FOLDER))
.build()));
}

Expand Down
27 changes: 17 additions & 10 deletions src/test/java/com/merge/api/integration/HrisIntegrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ void benefits() {
@Test
void companies() {
smokeListAndRetrieve(
client.hris().companies().list(), id -> client.hris().companies().retrieve(id));
client.hris().companies().list(),
id -> client.hris().companies().retrieve(id));
}

@Test
void dependents() {
smokeListAndRetrieve(
client.hris().dependents().list(), id -> client.hris().dependents().retrieve(id));
client.hris().dependents().list(),
id -> client.hris().dependents().retrieve(id));
}

@Test
Expand All @@ -66,7 +68,8 @@ void employeePayrollRuns() {
@Test
void employees() {
smokeListAndRetrieve(
client.hris().employees().list(), id -> client.hris().employees().retrieve(id));
client.hris().employees().list(),
id -> client.hris().employees().retrieve(id));
}

@Test
Expand All @@ -79,7 +82,8 @@ void employerBenefits() {
@Test
void employments() {
smokeListAndRetrieve(
client.hris().employments().list(), id -> client.hris().employments().retrieve(id));
client.hris().employments().list(),
id -> client.hris().employments().retrieve(id));
}

@Test
Expand All @@ -91,24 +95,28 @@ void groups() {
@Test
void locations() {
smokeListAndRetrieve(
client.hris().locations().list(), id -> client.hris().locations().retrieve(id));
client.hris().locations().list(),
id -> client.hris().locations().retrieve(id));
}

@Test
void payGroups() {
smokeListAndRetrieve(
client.hris().payGroups().list(), id -> client.hris().payGroups().retrieve(id));
client.hris().payGroups().list(),
id -> client.hris().payGroups().retrieve(id));
}

@Test
void payrollRuns() {
smokeListAndRetrieve(
client.hris().payrollRuns().list(), id -> client.hris().payrollRuns().retrieve(id));
client.hris().payrollRuns().list(),
id -> client.hris().payrollRuns().retrieve(id));
}

@Test
void teams() {
smokeListAndRetrieve(client.hris().teams().list(), id -> client.hris().teams().retrieve(id));
smokeListAndRetrieve(
client.hris().teams().list(), id -> client.hris().teams().retrieve(id));
}

@Test
Expand Down Expand Up @@ -138,8 +146,7 @@ void employeesExpand() {
.list(EmployeesListRequest.builder()
.pageSize(5)
.expand(List.of(
EmployeesListRequestExpandItem.EMPLOYMENTS,
EmployeesListRequestExpandItem.PAY_GROUP))
EmployeesListRequestExpandItem.EMPLOYMENTS, EmployeesListRequestExpandItem.PAY_GROUP))
.build()));
}

Expand Down
Loading
Loading