forked from intercom/intercom-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSegmentsTest.java
More file actions
42 lines (34 loc) · 1.09 KB
/
Copy pathSegmentsTest.java
File metadata and controls
42 lines (34 loc) · 1.09 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.segments.requests.FindSegmentRequest;
import com.intercom.api.resources.segments.types.Segment;
import com.intercom.api.types.SegmentList;
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 SegmentsTest {
private Intercom client;
private Segment segment;
@BeforeEach
public void before() {
// arrange
client = TestClientFactory.create();
segment = client.segments().list().getSegments().get(0);
}
@Test
public void testList() {
// act
SegmentList response = client.segments().list();
// assert
Assertions.assertNotNull(response);
}
@Test
public void testFind() {
// act
Segment response = client.segments()
.find(FindSegmentRequest.builder().segmentId(segment.getId()).build());
// assert
Assertions.assertNotNull(response);
}
}