|
| 1 | +/* |
| 2 | + * Bandwidth |
| 3 | + * |
| 4 | + * Bandwidth's Communication APIs |
| 5 | + * |
| 6 | + * The version of the OpenAPI document: 1.0.0 |
| 7 | + * Contact: letstalk@bandwidth.com |
| 8 | + * Generated by: https://github.com/openapitools/openapi-generator.git |
| 9 | + */ |
| 10 | + |
| 11 | + |
| 12 | +using Xunit; |
| 13 | + |
| 14 | +using System; |
| 15 | +using System.Linq; |
| 16 | +using System.IO; |
| 17 | +using System.Collections.Generic; |
| 18 | +using Bandwidth.Standard.Model; |
| 19 | +using Bandwidth.Standard.Client; |
| 20 | +using System.Reflection; |
| 21 | +using Newtonsoft.Json; |
| 22 | + |
| 23 | +namespace Bandwidth.Standard.Test.Model |
| 24 | +{ |
| 25 | + /// <summary> |
| 26 | + /// Class for testing Callback |
| 27 | + /// </summary> |
| 28 | + /// <remarks> |
| 29 | + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). |
| 30 | + /// Please update the test case below to test the model. |
| 31 | + /// </remarks> |
| 32 | + public class CallbackTests : IDisposable |
| 33 | + { |
| 34 | + private Callback instanceInboundCallback; |
| 35 | + private Callback instanceStatusCallback; |
| 36 | + |
| 37 | + public CallbackTests() |
| 38 | + { |
| 39 | + instanceInboundCallback = new Callback(new InboundCallback( |
| 40 | + time: DateTime.Now, |
| 41 | + type: InboundCallbackTypeEnum.MessageReceived, |
| 42 | + to: "1234567890", |
| 43 | + description: "Test Callback", |
| 44 | + message: new InboundCallbackMessage( |
| 45 | + id: "1661365814859loidf7mcwd4qacn7", |
| 46 | + owner: "+15553332222", |
| 47 | + applicationId: "93de2206-9669-4e07-948d-329f4b722ee2", |
| 48 | + time: DateTime.Now, |
| 49 | + segmentCount: 1, |
| 50 | + direction: MessageDirectionEnum.In, |
| 51 | + to: ["+15552223333"], |
| 52 | + from: "+15553332222" |
| 53 | + ), |
| 54 | + carrierName: "Test Carrier" |
| 55 | + )); |
| 56 | + |
| 57 | + instanceStatusCallback = new Callback(new StatusCallback( |
| 58 | + time: DateTime.Now, |
| 59 | + eventTime: DateTime.Now, |
| 60 | + type: StatusCallbackTypeEnum.Sending, |
| 61 | + to: "1234567890", |
| 62 | + description: "Test Status Callback", |
| 63 | + message: new StatusCallbackMessage( |
| 64 | + id: "1661365814859loidf7mcwd4qacn7", |
| 65 | + owner: "+15553332222", |
| 66 | + applicationId: "93de2206-9669-4e07-948d-329f4b722ee2", |
| 67 | + time: DateTime.Now, |
| 68 | + segmentCount: 1, |
| 69 | + direction: MessageDirectionEnum.In, |
| 70 | + to: ["+15552223333"], |
| 71 | + from: "+15553332222", |
| 72 | + text: "Hello world", |
| 73 | + tag: "custom string", |
| 74 | + media: ["https://dev.bandwidth.com/images/bandwidth-logo.png"], |
| 75 | + priority: PriorityEnum.Default, |
| 76 | + channel: MultiChannelMessageChannelEnum.SMS |
| 77 | + ), |
| 78 | + carrierName: "Test Carrier" |
| 79 | + )); |
| 80 | + } |
| 81 | + |
| 82 | + public void Dispose() |
| 83 | + { |
| 84 | + // Cleanup when everything is done. |
| 85 | + } |
| 86 | + |
| 87 | + /// <summary> |
| 88 | + /// Test an instance of Callback |
| 89 | + /// </summary> |
| 90 | + [Fact] |
| 91 | + public void CallbackInstanceTest() |
| 92 | + { |
| 93 | + Assert.IsType<Callback>(instanceInboundCallback); |
| 94 | + Assert.IsType<InboundCallback>(instanceInboundCallback.ActualInstance); |
| 95 | + Assert.IsType<Callback>(instanceStatusCallback); |
| 96 | + Assert.IsType<StatusCallback>(instanceStatusCallback.ActualInstance); |
| 97 | + } |
| 98 | + } |
| 99 | +} |
0 commit comments