Skip to content

Commit 1282c43

Browse files
committed
update tests
1 parent 004c69c commit 1282c43

File tree

3 files changed

+282
-0
lines changed

3 files changed

+282
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Bandwidth
3+
* Bandwidth's Communication APIs
4+
*
5+
* The version of the OpenAPI document: 1.0.0
6+
* Contact: [email protected]
7+
*
8+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9+
* https://openapi-generator.tech
10+
* Do not edit the class manually.
11+
*/
12+
13+
package com.bandwidth.sdk.unit.models;
14+
15+
import org.junit.jupiter.api.Test;
16+
17+
import com.bandwidth.sdk.model.CallbackTypeEnum;
18+
19+
import static org.hamcrest.CoreMatchers.equalTo;
20+
import static org.hamcrest.MatcherAssert.assertThat;
21+
22+
/**
23+
* Model tests for CallbackTypeEnum
24+
*/
25+
public class CallbackTypeEnumTest {
26+
/**
27+
* Model tests for CallbackTypeEnum
28+
*/
29+
@Test
30+
public void testCallbackTypeEnum() {
31+
assertThat(CallbackTypeEnum.DELIVERED.toString(), equalTo("message-delivered"));
32+
assertThat(CallbackTypeEnum.FAILED.toString(), equalTo("message-failed"));
33+
assertThat(CallbackTypeEnum.RECEIVED.toString(), equalTo("message-received"));
34+
assertThat(CallbackTypeEnum.SENDING.toString(), equalTo("message-sending"));
35+
}
36+
37+
}
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
/*
2+
* Bandwidth
3+
* Bandwidth's Communication APIs
4+
*
5+
* The version of the OpenAPI document: 1.0.0
6+
* Contact: [email protected]
7+
*
8+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9+
* https://openapi-generator.tech
10+
* Do not edit the class manually.
11+
*/
12+
13+
package com.bandwidth.sdk.unit.models;
14+
15+
import org.junit.jupiter.api.Test;
16+
17+
import java.net.URI;
18+
import java.time.OffsetDateTime;
19+
import java.util.ArrayList;
20+
import java.util.List;
21+
import java.util.Set;
22+
import org.mockito.internal.util.collections.Sets;
23+
import com.bandwidth.sdk.model.MessageCallbackMessage;
24+
import com.bandwidth.sdk.model.MessageDirectionEnum;
25+
import com.bandwidth.sdk.model.PriorityEnum;
26+
27+
import static org.hamcrest.MatcherAssert.assertThat;
28+
import static org.hamcrest.CoreMatchers.instanceOf;
29+
30+
/**
31+
* Model tests for MessageCallbackMessage
32+
*/
33+
public class MessageCallbackMessageTest {
34+
private final MessageCallbackMessage model = new MessageCallbackMessage()
35+
.id("id")
36+
.owner("owner")
37+
.applicationId("applicationId")
38+
.time(OffsetDateTime.now())
39+
.segmentCount(1)
40+
.direction(MessageDirectionEnum.IN)
41+
.to(Sets.newSet("+1234567890"))
42+
.from("from")
43+
.text("text")
44+
.tag("tag")
45+
.media(new ArrayList<URI>())
46+
.priority(PriorityEnum.HIGH);
47+
48+
/**
49+
* Model tests for MessageCallbackMessage
50+
*/
51+
@Test
52+
public void testMessageCallbackMessage() {
53+
assertThat(model, instanceOf(MessageCallbackMessage.class));
54+
}
55+
56+
/**
57+
* Test the property 'id'
58+
*/
59+
@Test
60+
public void idTest() {
61+
assertThat(model.getId(), instanceOf(String.class));
62+
}
63+
64+
/**
65+
* Test the property 'owner'
66+
*/
67+
@Test
68+
public void ownerTest() {
69+
assertThat(model.getOwner(), instanceOf(String.class));
70+
}
71+
72+
/**
73+
* Test the property 'applicationId'
74+
*/
75+
@Test
76+
public void applicationIdTest() {
77+
assertThat(model.getApplicationId(), instanceOf(String.class));
78+
}
79+
80+
/**
81+
* Test the property 'time'
82+
*/
83+
@Test
84+
public void timeTest() {
85+
assertThat(model.getTime(), instanceOf(OffsetDateTime.class));
86+
}
87+
88+
/**
89+
* Test the property 'segmentCount'
90+
*/
91+
@Test
92+
public void segmentCountTest() {
93+
assertThat(model.getSegmentCount(), instanceOf(Integer.class));
94+
}
95+
96+
/**
97+
* Test the property 'direction'
98+
*/
99+
@Test
100+
public void directionTest() {
101+
assertThat(model.getDirection(), instanceOf(MessageDirectionEnum.class));
102+
}
103+
104+
/**
105+
* Test the property 'to'
106+
*/
107+
@Test
108+
public void toTest() {
109+
assertThat(model.getTo(), instanceOf(Set.class));
110+
}
111+
112+
/**
113+
* Test the property 'from'
114+
*/
115+
@Test
116+
public void fromTest() {
117+
assertThat(model.getFrom(), instanceOf(String.class));
118+
}
119+
120+
/**
121+
* Test the property 'text'
122+
*/
123+
@Test
124+
public void textTest() {
125+
assertThat(model.getText(), instanceOf(String.class));
126+
}
127+
128+
/**
129+
* Test the property 'tag'
130+
*/
131+
@Test
132+
public void tagTest() {
133+
assertThat(model.getTag(), instanceOf(String.class));
134+
}
135+
136+
/**
137+
* Test the property 'media'
138+
*/
139+
@Test
140+
public void mediaTest() {
141+
assertThat(model.getMedia(), instanceOf(List.class));
142+
}
143+
144+
/**
145+
* Test the property 'priority'
146+
*/
147+
@Test
148+
public void priorityTest() {
149+
assertThat(model.getPriority(), instanceOf(PriorityEnum.class));
150+
}
151+
152+
}
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
/*
2+
* Bandwidth
3+
* Bandwidth's Communication APIs
4+
*
5+
* The version of the OpenAPI document: 1.0.0
6+
* Contact: [email protected]
7+
*
8+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9+
* https://openapi-generator.tech
10+
* Do not edit the class manually.
11+
*/
12+
13+
package com.bandwidth.sdk.unit.models;
14+
15+
import org.junit.jupiter.api.Test;
16+
17+
import java.time.OffsetDateTime;
18+
import com.bandwidth.sdk.model.MessageCallback;
19+
import com.bandwidth.sdk.model.CallbackTypeEnum;
20+
import com.bandwidth.sdk.model.MessageCallbackMessage;
21+
22+
import static org.hamcrest.MatcherAssert.assertThat;
23+
import static org.hamcrest.CoreMatchers.instanceOf;
24+
25+
/**
26+
* Model tests for MessageCallback
27+
*/
28+
public class MessageCallbackTest {
29+
private final MessageCallback model = new MessageCallback()
30+
.time(OffsetDateTime.now())
31+
.type(CallbackTypeEnum.DELIVERED)
32+
.to("+1234567890")
33+
.description("description")
34+
.message(new MessageCallbackMessage())
35+
.errorCode(123);
36+
37+
/**
38+
* Model tests for MessageCallback
39+
*/
40+
@Test
41+
public void testMessageCallback() {
42+
assertThat(model, instanceOf(MessageCallback.class));
43+
}
44+
45+
/**
46+
* Test the property 'time'
47+
*/
48+
@Test
49+
public void timeTest() {
50+
assertThat(model.getTime(), instanceOf(OffsetDateTime.class));
51+
}
52+
53+
/**
54+
* Test the property 'type'
55+
*/
56+
@Test
57+
public void typeTest() {
58+
assertThat(model.getType(), instanceOf(CallbackTypeEnum.class));
59+
}
60+
61+
/**
62+
* Test the property 'to'
63+
*/
64+
@Test
65+
public void toTest() {
66+
assertThat(model.getTo(), instanceOf(String.class));
67+
}
68+
69+
/**
70+
* Test the property 'description'
71+
*/
72+
@Test
73+
public void descriptionTest() {
74+
assertThat(model.getDescription(), instanceOf(String.class));
75+
}
76+
77+
/**
78+
* Test the property 'message'
79+
*/
80+
@Test
81+
public void messageTest() {
82+
assertThat(model.getMessage(), instanceOf(MessageCallbackMessage.class));
83+
}
84+
85+
/**
86+
* Test the property 'errorCode'
87+
*/
88+
@Test
89+
public void errorCodeTest() {
90+
assertThat(model.getErrorCode(), instanceOf(Integer.class));
91+
}
92+
93+
}

0 commit comments

Comments
 (0)