Skip to content

Commit 918d651

Browse files
committed
models unit tests
1 parent c346b69 commit 918d651

26 files changed

+2017
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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.AdditionalDenialReason;
18+
19+
import static org.hamcrest.MatcherAssert.assertThat;
20+
import static org.hamcrest.CoreMatchers.instanceOf;
21+
22+
/**
23+
* Model tests for AdditionalDenialReason
24+
*/
25+
public class AdditionalDenialReasonTest {
26+
private final AdditionalDenialReason model = new AdditionalDenialReason()
27+
.statusCode(403)
28+
.reason("Forbidden")
29+
.resubmitAllowed(true);
30+
31+
/**
32+
* Model tests for AdditionalDenialReason
33+
*/
34+
@Test
35+
public void testAdditionalDenialReason() {
36+
assertThat(model, instanceOf(AdditionalDenialReason.class));
37+
}
38+
39+
/**
40+
* Test the property 'statusCode'
41+
*/
42+
@Test
43+
public void statusCodeTest() {
44+
assertThat(model.getStatusCode(), instanceOf(Integer.class));
45+
}
46+
47+
/**
48+
* Test the property 'reason'
49+
*/
50+
@Test
51+
public void reasonTest() {
52+
assertThat(model.getReason(), instanceOf(String.class));
53+
}
54+
55+
/**
56+
* Test the property 'resubmitAllowed'
57+
*/
58+
@Test
59+
public void resubmitAllowedTest() {
60+
assertThat(model.getResubmitAllowed(), instanceOf(Boolean.class));
61+
}
62+
63+
}
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
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.Address;
18+
19+
import static org.hamcrest.MatcherAssert.assertThat;
20+
import static org.hamcrest.CoreMatchers.instanceOf;
21+
22+
/**
23+
* Model tests for Address
24+
*/
25+
public class AddressTest {
26+
private final Address model = new Address()
27+
.name("name")
28+
.addr1("addr1")
29+
.addr2("addr2")
30+
.city("city")
31+
.state("state")
32+
.zip("zip")
33+
.url("url");
34+
35+
/**
36+
* Model tests for Address
37+
*/
38+
@Test
39+
public void testAddress() {
40+
assertThat(model, instanceOf(Address.class));
41+
}
42+
43+
/**
44+
* Test the property 'name'
45+
*/
46+
@Test
47+
public void nameTest() {
48+
assertThat(model.getName(), instanceOf(String.class));
49+
}
50+
51+
/**
52+
* Test the property 'addr1'
53+
*/
54+
@Test
55+
public void addr1Test() {
56+
assertThat(model.getAddr1(), instanceOf(String.class));
57+
}
58+
59+
/**
60+
* Test the property 'addr2'
61+
*/
62+
@Test
63+
public void addr2Test() {
64+
assertThat(model.getAddr2(), instanceOf(String.class));
65+
}
66+
67+
/**
68+
* Test the property 'city'
69+
*/
70+
@Test
71+
public void cityTest() {
72+
assertThat(model.getCity(), instanceOf(String.class));
73+
}
74+
75+
/**
76+
* Test the property 'state'
77+
*/
78+
@Test
79+
public void stateTest() {
80+
assertThat(model.getState(), instanceOf(String.class));
81+
}
82+
83+
/**
84+
* Test the property 'zip'
85+
*/
86+
@Test
87+
public void zipTest() {
88+
assertThat(model.getZip(), instanceOf(String.class));
89+
}
90+
91+
/**
92+
* Test the property 'url'
93+
*/
94+
@Test
95+
public void urlTest() {
96+
assertThat(model.getUrl(), instanceOf(String.class));
97+
}
98+
99+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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.Contact;
18+
19+
import static org.hamcrest.MatcherAssert.assertThat;
20+
import static org.hamcrest.CoreMatchers.instanceOf;
21+
22+
/**
23+
* Model tests for Contact
24+
*/
25+
public class ContactTest {
26+
private final Contact model = new Contact()
27+
.firstName("firstName")
28+
.lastName("lastName")
29+
.email("email")
30+
.phoneNumber("phoneNumber");
31+
32+
/**
33+
* Model tests for Contact
34+
*/
35+
@Test
36+
public void testContact() {
37+
assertThat(model, instanceOf(Contact.class));
38+
}
39+
40+
/**
41+
* Test the property 'firstName'
42+
*/
43+
@Test
44+
public void firstNameTest() {
45+
assertThat(model.getFirstName(), instanceOf(String.class));
46+
}
47+
48+
/**
49+
* Test the property 'lastName'
50+
*/
51+
@Test
52+
public void lastNameTest() {
53+
assertThat(model.getLastName(), instanceOf(String.class));
54+
}
55+
56+
/**
57+
* Test the property 'email'
58+
*/
59+
@Test
60+
public void emailTest() {
61+
assertThat(model.getEmail(), instanceOf(String.class));
62+
}
63+
64+
/**
65+
* Test the property 'phoneNumber'
66+
*/
67+
@Test
68+
public void phoneNumberTest() {
69+
assertThat(model.getPhoneNumber(), instanceOf(String.class));
70+
}
71+
72+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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.util.List;
18+
import java.util.Arrays;
19+
import java.util.ArrayList;
20+
import com.bandwidth.sdk.model.Error;
21+
import com.bandwidth.sdk.model.TelephoneNumber;
22+
23+
import static org.hamcrest.MatcherAssert.assertThat;
24+
import static org.hamcrest.CoreMatchers.instanceOf;
25+
26+
/**
27+
* Model tests for Error
28+
*/
29+
public class ErrorTest {
30+
private final Error model = new Error()
31+
.code(1234)
32+
.description("description")
33+
.telephoneNumbers(new ArrayList<TelephoneNumber>(Arrays.asList(new TelephoneNumber())));
34+
35+
/**
36+
* Model tests for Error
37+
*/
38+
@Test
39+
public void testError() {
40+
assertThat(model, instanceOf(Error.class));
41+
}
42+
43+
/**
44+
* Test the property 'code'
45+
*/
46+
@Test
47+
public void codeTest() {
48+
assertThat(model.getCode(), instanceOf(Integer.class));
49+
}
50+
51+
/**
52+
* Test the property 'description'
53+
*/
54+
@Test
55+
public void descriptionTest() {
56+
assertThat(model.getDescription(), instanceOf(String.class));
57+
}
58+
59+
/**
60+
* Test the property 'telephoneNumbers'
61+
*/
62+
@Test
63+
public void telephoneNumbersTest() {
64+
assertThat(model.getTelephoneNumbers(), instanceOf(List.class));
65+
}
66+
67+
}

0 commit comments

Comments
 (0)