Skip to content

Commit 50ebe1b

Browse files
committed
new unit tests
1 parent 60783fb commit 50ebe1b

15 files changed

Lines changed: 1671 additions & 0 deletions
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
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+
}
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
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 ErrorSource
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 ErrorSourceTests : IDisposable
33+
{
34+
private ErrorSource instance;
35+
36+
public ErrorSourceTests()
37+
{
38+
instance = new ErrorSource(
39+
varParameter: "TestParameter",
40+
field: "TestField",
41+
header: "TestHeader",
42+
reference: "TestReference"
43+
);
44+
}
45+
46+
public void Dispose()
47+
{
48+
// Cleanup when everything is done.
49+
}
50+
51+
/// <summary>
52+
/// Test an instance of ErrorSource
53+
/// </summary>
54+
[Fact]
55+
public void ErrorSourceInstanceTest()
56+
{
57+
Assert.IsType<ErrorSource>(instance);
58+
}
59+
60+
/// <summary>
61+
/// Test the property 'Parameter'
62+
/// </summary>
63+
[Fact]
64+
public void ParameterTest()
65+
{
66+
Assert.IsType<string>(instance.Parameter);
67+
Assert.Equal("TestParameter", instance.Parameter);
68+
}
69+
70+
/// <summary>
71+
/// Test the property 'Field'
72+
/// </summary>
73+
[Fact]
74+
public void FieldTest()
75+
{
76+
Assert.IsType<string>(instance.Field);
77+
Assert.Equal("TestField", instance.Field);
78+
}
79+
80+
/// <summary>
81+
/// Test the property 'Header'
82+
/// </summary>
83+
[Fact]
84+
public void HeaderTest()
85+
{
86+
Assert.IsType<string>(instance.Header);
87+
Assert.Equal("TestHeader", instance.Header);
88+
}
89+
90+
/// <summary>
91+
/// Test the property 'Reference'
92+
/// </summary>
93+
[Fact]
94+
public void ReferenceTest()
95+
{
96+
Assert.IsType<string>(instance.Reference);
97+
Assert.Equal("TestReference", instance.Reference);
98+
}
99+
}
100+
}

0 commit comments

Comments
 (0)