|
| 1 | +/* |
| 2 | + * Bandwidth |
| 3 | + * Bandwidth's Communication APIs |
| 4 | + * |
| 5 | + * The version of the OpenAPI document: 1.0.0 |
| 6 | + |
| 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 | +import org.mockito.internal.util.collections.Sets; |
| 18 | + |
| 19 | +import java.time.OffsetDateTime; |
| 20 | +import java.util.ArrayList; |
| 21 | +import java.util.LinkedHashSet; |
| 22 | +import com.bandwidth.sdk.model.InboundCallbackMessage; |
| 23 | +import com.bandwidth.sdk.model.MessageDirectionEnum; |
| 24 | +import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; |
| 25 | +import com.bandwidth.sdk.model.MultiChannelMessageContent; |
| 26 | +import com.bandwidth.sdk.model.PriorityEnum; |
| 27 | +import com.bandwidth.sdk.model.RbmLocationResponse; |
| 28 | +import com.bandwidth.sdk.model.RbmSuggestionResponse; |
| 29 | + |
| 30 | +import static org.hamcrest.CoreMatchers.instanceOf; |
| 31 | +import static org.hamcrest.MatcherAssert.assertThat; |
| 32 | + |
| 33 | +/** |
| 34 | + * Model tests for InboundCallbackMessage |
| 35 | + */ |
| 36 | +public class InboundCallbackMessageTest { |
| 37 | + private final InboundCallbackMessage model = new InboundCallbackMessage() |
| 38 | + .id("id") |
| 39 | + .owner("owner") |
| 40 | + .applicationId("applicationId") |
| 41 | + .time(OffsetDateTime.now()) |
| 42 | + .segmentCount(1) |
| 43 | + .direction(MessageDirectionEnum.IN) |
| 44 | + .to(Sets.newSet("to")) |
| 45 | + .from("from") |
| 46 | + .text("text") |
| 47 | + .tag("tag") |
| 48 | + .media(new ArrayList<>()) |
| 49 | + .priority(PriorityEnum.DEFAULT) |
| 50 | + .channel(MultiChannelMessageChannelEnum.SMS) |
| 51 | + .content(new MultiChannelMessageContent()) |
| 52 | + .suggestionResponse(new RbmSuggestionResponse()) |
| 53 | + .locationResponse(new RbmLocationResponse()); |
| 54 | + |
| 55 | + /** |
| 56 | + * Model tests for InboundCallbackMessage |
| 57 | + */ |
| 58 | + @Test |
| 59 | + public void testInboundCallbackMessage() { |
| 60 | + assertThat(model, instanceOf(InboundCallbackMessage.class)); |
| 61 | + } |
| 62 | + |
| 63 | + /** |
| 64 | + * Test the property 'id' |
| 65 | + */ |
| 66 | + @Test |
| 67 | + public void idTest() { |
| 68 | + assertThat(model.getId(), instanceOf(String.class)); |
| 69 | + } |
| 70 | + |
| 71 | + /** |
| 72 | + * Test the property 'owner' |
| 73 | + */ |
| 74 | + @Test |
| 75 | + public void ownerTest() { |
| 76 | + assertThat(model.getOwner(), instanceOf(String.class)); |
| 77 | + } |
| 78 | + |
| 79 | + /** |
| 80 | + * Test the property 'applicationId' |
| 81 | + */ |
| 82 | + @Test |
| 83 | + public void applicationIdTest() { |
| 84 | + assertThat(model.getApplicationId(), instanceOf(String.class)); |
| 85 | + } |
| 86 | + |
| 87 | + /** |
| 88 | + * Test the property 'time' |
| 89 | + */ |
| 90 | + @Test |
| 91 | + public void timeTest() { |
| 92 | + assertThat(model.getTime(), instanceOf(OffsetDateTime.class)); |
| 93 | + } |
| 94 | + |
| 95 | + /** |
| 96 | + * Test the property 'segmentCount' |
| 97 | + */ |
| 98 | + @Test |
| 99 | + public void segmentCountTest() { |
| 100 | + assertThat(model.getSegmentCount(), instanceOf(Integer.class)); |
| 101 | + } |
| 102 | + |
| 103 | + /** |
| 104 | + * Test the property 'direction' |
| 105 | + */ |
| 106 | + @Test |
| 107 | + public void directionTest() { |
| 108 | + assertThat(model.getDirection(), instanceOf(MessageDirectionEnum.class)); |
| 109 | + } |
| 110 | + |
| 111 | + /** |
| 112 | + * Test the property 'to' |
| 113 | + */ |
| 114 | + @Test |
| 115 | + public void toTest() { |
| 116 | + assertThat(model.getTo(), instanceOf(LinkedHashSet.class)); |
| 117 | + } |
| 118 | + |
| 119 | + /** |
| 120 | + * Test the property 'from' |
| 121 | + */ |
| 122 | + @Test |
| 123 | + public void fromTest() { |
| 124 | + assertThat(model.getFrom(), instanceOf(String.class)); |
| 125 | + } |
| 126 | + |
| 127 | + /** |
| 128 | + * Test the property 'text' |
| 129 | + */ |
| 130 | + @Test |
| 131 | + public void textTest() { |
| 132 | + assertThat(model.getText(), instanceOf(String.class)); |
| 133 | + } |
| 134 | + |
| 135 | + /** |
| 136 | + * Test the property 'tag' |
| 137 | + */ |
| 138 | + @Test |
| 139 | + public void tagTest() { |
| 140 | + |
| 141 | + } |
| 142 | + |
| 143 | + /** |
| 144 | + * Test the property 'media' |
| 145 | + */ |
| 146 | + @Test |
| 147 | + public void mediaTest() { |
| 148 | + assertThat(model.getMedia(), instanceOf(ArrayList.class)); |
| 149 | + } |
| 150 | + |
| 151 | + /** |
| 152 | + * Test the property 'priority' |
| 153 | + */ |
| 154 | + @Test |
| 155 | + public void priorityTest() { |
| 156 | + assertThat(model.getPriority(), instanceOf(PriorityEnum.class)); |
| 157 | + } |
| 158 | + |
| 159 | + /** |
| 160 | + * Test the property 'channel' |
| 161 | + */ |
| 162 | + @Test |
| 163 | + public void channelTest() { |
| 164 | + assertThat(model.getChannel(), instanceOf(MultiChannelMessageChannelEnum.class)); |
| 165 | + } |
| 166 | + |
| 167 | + /** |
| 168 | + * Test the property 'content' |
| 169 | + */ |
| 170 | + @Test |
| 171 | + public void contentTest() { |
| 172 | + assertThat(model.getContent(), instanceOf(MultiChannelMessageContent.class)); |
| 173 | + } |
| 174 | + |
| 175 | + /** |
| 176 | + * Test the property 'suggestionResponse' |
| 177 | + */ |
| 178 | + @Test |
| 179 | + public void suggestionResponseTest() { |
| 180 | + assertThat(model.getSuggestionResponse(), instanceOf(RbmSuggestionResponse.class)); |
| 181 | + } |
| 182 | + |
| 183 | + /** |
| 184 | + * Test the property 'locationResponse' |
| 185 | + */ |
| 186 | + @Test |
| 187 | + public void locationResponseTest() { |
| 188 | + assertThat(model.getLocationResponse(), instanceOf(RbmLocationResponse.class)); |
| 189 | + } |
| 190 | + |
| 191 | +} |
0 commit comments