Skip to content

Commit 904dad8

Browse files
committed
non-polymorphism unit tests
1 parent 8485e7e commit 904dad8

22 files changed

+1660
-0
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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+
14+
package com.bandwidth.sdk.unit.models;
15+
16+
import org.junit.jupiter.api.Test;
17+
18+
import com.bandwidth.sdk.model.CreateMultiChannelMessageResponse;
19+
import com.bandwidth.sdk.model.ErrorObject;
20+
import com.bandwidth.sdk.model.Link;
21+
import com.bandwidth.sdk.model.MultiChannelMessageData;
22+
23+
import java.util.ArrayList;
24+
import java.util.Arrays;
25+
import java.util.List;
26+
27+
import static org.hamcrest.MatcherAssert.assertThat;
28+
import static org.hamcrest.CoreMatchers.instanceOf;
29+
30+
/**
31+
* Model tests for CreateMultiChannelMessageResponse
32+
*/
33+
public class CreateMultiChannelMessageResponseTest {
34+
private final CreateMultiChannelMessageResponse model = new CreateMultiChannelMessageResponse()
35+
.links(new ArrayList<Link>(Arrays.asList(new Link())))
36+
.data(new MultiChannelMessageData())
37+
.errors(new ArrayList<ErrorObject>(Arrays.asList(new ErrorObject())));
38+
39+
/**
40+
* Model tests for CreateMultiChannelMessageResponse
41+
*/
42+
@Test
43+
public void testCreateMultiChannelMessageResponse() {
44+
assertThat(model, instanceOf(CreateMultiChannelMessageResponse.class));
45+
}
46+
47+
/**
48+
* Test the property 'links'
49+
*/
50+
@Test
51+
public void linksTest() {
52+
assertThat(model.getLinks(), instanceOf(List.class));
53+
}
54+
55+
/**
56+
* Test the property 'data'
57+
*/
58+
@Test
59+
public void dataTest() {
60+
assertThat(model.getData(), instanceOf(MultiChannelMessageData.class));
61+
}
62+
63+
/**
64+
* Test the property 'errors'
65+
*/
66+
@Test
67+
public void errorsTest() {
68+
assertThat(model.getErrors(), instanceOf(List.class));
69+
}
70+
71+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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+
14+
package com.bandwidth.sdk.unit.models;
15+
16+
import org.junit.jupiter.api.Test;
17+
18+
import com.bandwidth.sdk.model.ErrorObject;
19+
20+
import static org.hamcrest.MatcherAssert.assertThat;
21+
import static org.hamcrest.CoreMatchers.instanceOf;
22+
23+
/**
24+
* Model tests for ErrorObject
25+
*/
26+
public class ErrorObjectTest {
27+
private final ErrorObject model = new ErrorObject()
28+
.code("code")
29+
.message("message");
30+
31+
/**
32+
* Model tests for ErrorObject
33+
*/
34+
@Test
35+
public void testErrorObject() {
36+
assertThat(model, instanceOf(ErrorObject.class));
37+
}
38+
39+
/**
40+
* Test the property 'code'
41+
*/
42+
@Test
43+
public void codeTest() {
44+
assertThat(model.getCode(), instanceOf(String.class));
45+
}
46+
47+
/**
48+
* Test the property 'message'
49+
*/
50+
@Test
51+
public void messageTest() {
52+
assertThat(model.getMessage(), instanceOf(String.class));
53+
}
54+
55+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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+
14+
package com.bandwidth.sdk.unit.models;
15+
16+
import org.junit.jupiter.api.Test;
17+
18+
import com.bandwidth.sdk.model.Link;
19+
20+
import static org.hamcrest.MatcherAssert.assertThat;
21+
import static org.hamcrest.CoreMatchers.instanceOf;
22+
23+
/**
24+
* Model tests for Link
25+
*/
26+
public class LinkTest {
27+
private final Link model = new Link()
28+
.rel("rel")
29+
.href("href");
30+
31+
/**
32+
* Model tests for Link
33+
*/
34+
@Test
35+
public void testLink() {
36+
assertThat(model, instanceOf(Link.class));
37+
}
38+
39+
/**
40+
* Test the property 'rel'
41+
*/
42+
@Test
43+
public void relTest() {
44+
assertThat(model.getRel(), instanceOf(String.class));
45+
}
46+
47+
/**
48+
* Test the property 'href'
49+
*/
50+
@Test
51+
public void hrefTest() {
52+
assertThat(model.getHref(), instanceOf(String.class));
53+
}
54+
55+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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+
14+
package com.bandwidth.sdk.unit.models;
15+
16+
import org.junit.jupiter.api.Test;
17+
18+
import com.bandwidth.sdk.model.MmsMessageContent;
19+
20+
import java.net.URI;
21+
import java.util.ArrayList;
22+
import java.util.Arrays;
23+
24+
import static org.hamcrest.MatcherAssert.assertThat;
25+
import static org.hamcrest.CoreMatchers.instanceOf;
26+
27+
/**
28+
* Model tests for MmsMessageContent
29+
*/
30+
public class MmsMessageContentTest {
31+
private final MmsMessageContent model = new MmsMessageContent()
32+
.text("text")
33+
.media(new ArrayList<URI>(Arrays.asList(URI.create("https://bandwidth.com"))));
34+
35+
/**
36+
* Model tests for MmsMessageContent
37+
*/
38+
@Test
39+
public void testMmsMessageContent() {
40+
assertThat(model, instanceOf(MmsMessageContent.class));
41+
}
42+
43+
/**
44+
* Test the property 'text'
45+
*/
46+
@Test
47+
public void textTest() {
48+
assertThat(model.getText(), instanceOf(String.class));
49+
}
50+
51+
/**
52+
* Test the property 'media'
53+
*/
54+
@Test
55+
public void mediaTest() {
56+
assertThat(model.getMedia(), instanceOf(ArrayList.class));
57+
}
58+
59+
}
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
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+
14+
package com.bandwidth.sdk.unit.models;
15+
16+
import org.junit.jupiter.api.Test;
17+
18+
import com.bandwidth.sdk.model.MultiChannelActionCalendarEvent;
19+
import com.bandwidth.sdk.model.RbmActionTypeEnum;
20+
21+
import java.time.OffsetDateTime;
22+
import java.util.HexFormat;
23+
24+
import static org.hamcrest.MatcherAssert.assertThat;
25+
import static org.hamcrest.CoreMatchers.instanceOf;
26+
27+
/**
28+
* Model tests for MultiChannelActionCalendarEvent
29+
*/
30+
public class MultiChannelActionCalendarEventTest {
31+
private final MultiChannelActionCalendarEvent model = new MultiChannelActionCalendarEvent()
32+
.type(RbmActionTypeEnum.REPLY)
33+
.text("text")
34+
.postBackData(HexFormat.of().parseHex("e04f"))
35+
.title("title")
36+
.startTime(OffsetDateTime.now())
37+
.endTime(OffsetDateTime.now())
38+
.description("description");
39+
40+
/**
41+
* Model tests for MultiChannelActionCalendarEvent
42+
*/
43+
@Test
44+
public void testMultiChannelActionCalendarEvent() {
45+
assertThat(model, instanceOf(MultiChannelActionCalendarEvent.class));
46+
}
47+
48+
/**
49+
* Test the property 'type'
50+
*/
51+
@Test
52+
public void typeTest() {
53+
assertThat(model.getType(), instanceOf(RbmActionTypeEnum.class));
54+
}
55+
56+
/**
57+
* Test the property 'text'
58+
*/
59+
@Test
60+
public void textTest() {
61+
assertThat(model.getText(), instanceOf(String.class));
62+
}
63+
64+
/**
65+
* Test the property 'postBackData'
66+
*/
67+
@Test
68+
public void postBackDataTest() {
69+
assertThat(model.getPostBackData(), instanceOf(byte[].class));
70+
}
71+
72+
/**
73+
* Test the property 'title'
74+
*/
75+
@Test
76+
public void titleTest() {
77+
assertThat(model.getTitle(), instanceOf(String.class));
78+
}
79+
80+
/**
81+
* Test the property 'startTime'
82+
*/
83+
@Test
84+
public void startTimeTest() {
85+
assertThat(model.getStartTime(), instanceOf(OffsetDateTime.class));
86+
}
87+
88+
/**
89+
* Test the property 'endTime'
90+
*/
91+
@Test
92+
public void endTimeTest() {
93+
assertThat(model.getEndTime(), instanceOf(OffsetDateTime.class));
94+
}
95+
96+
/**
97+
* Test the property 'description'
98+
*/
99+
@Test
100+
public void descriptionTest() {
101+
assertThat(model.getDescription(), instanceOf(String.class));
102+
}
103+
104+
}

0 commit comments

Comments
 (0)