forked from intercom/intercom-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTeamsTest.java
More file actions
42 lines (34 loc) · 1.05 KB
/
Copy pathTeamsTest.java
File metadata and controls
42 lines (34 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.intercom.api.integration;
import com.intercom.api.Intercom;
import com.intercom.api.resources.teams.requests.FindTeamRequest;
import com.intercom.api.resources.teams.types.Team;
import com.intercom.api.types.TeamList;
import com.intercom.api.utils.TestClientFactory;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class TeamsTest {
private Intercom client;
private String teamId;
@BeforeEach
public void before() {
// arrange
client = TestClientFactory.create();
teamId = client.teams().list().getTeams().get(0).getId();
}
@Test
public void testList() {
// act
TeamList response = client.teams().list();
// assert
Assertions.assertNotNull(response);
}
@Test
public void testFind() {
// act
Team response =
client.teams().find(FindTeamRequest.builder().teamId(teamId).build());
// assert
Assertions.assertNotNull(response);
}
}