Skip to content

EventTests #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
31 changes: 31 additions & 0 deletions src/test/java/unit/java/sdk/EventTests.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package unit.java.sdk;

import org.junit.Test;
import unit.java.sdk.api.GetEventApi;
import unit.java.sdk.api.GetListEventsApi;
import unit.java.sdk.model.UnitEventListResponse;
import unit.java.sdk.model.UnitEventResponse1;


import static unit.java.sdk.TestHelpers.getApiClient;

public class EventTests {
@Test
public void GetListEvents() throws ApiException {
GetListEventsApi api = new GetListEventsApi(getApiClient());

UnitEventListResponse response = api.execute(null, null);
assert response.getData().size() > 0;

GetEventApi getEventApi = new GetEventApi(getApiClient());

response.getData().forEach(x -> {
try {
UnitEventResponse1 event = getEventApi.execute(x.getId());
assert event.getData().getId().equals(x.getId());
} catch (ApiException e) {
throw new RuntimeException(e);
}
});
}
}