Skip to content

Commit a9e5f0d

Browse files
committed
unit tests
1 parent 598d50d commit a9e5f0d

3 files changed

Lines changed: 132 additions & 0 deletions

File tree

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
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.Unit.Model
24+
{
25+
/// <summary>
26+
/// Class for testing RecordingTranscriptionClip
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 RecordingTranscriptionClipTests : IDisposable
33+
{
34+
private RecordingTranscriptionClip instance;
35+
36+
public RecordingTranscriptionClipTests()
37+
{
38+
instance = new RecordingTranscriptionClip(
39+
speaker: 1,
40+
text: "text",
41+
confidence: 0.9,
42+
startTimeSeconds: 0.0,
43+
endTimeSeconds: 1.0
44+
);
45+
}
46+
47+
public void Dispose()
48+
{
49+
// Cleanup when everything is done.
50+
}
51+
52+
/// <summary>
53+
/// Test an instance of RecordingTranscriptionClip
54+
/// </summary>
55+
[Fact]
56+
public void RecordingTranscriptionClipInstanceTest()
57+
{
58+
Assert.IsType<RecordingTranscriptionClip>(instance);
59+
}
60+
61+
/// <summary>
62+
/// Test the property 'Speaker'
63+
/// </summary>
64+
[Fact]
65+
public void SpeakerTest()
66+
{
67+
Assert.IsType<int>(instance.Speaker);
68+
Assert.Equal(1, instance.Speaker);
69+
}
70+
71+
/// <summary>
72+
/// Test the property 'Text'
73+
/// </summary>
74+
[Fact]
75+
public void TextTest()
76+
{
77+
Assert.IsType<string>(instance.Text);
78+
Assert.Equal("text", instance.Text);
79+
}
80+
81+
/// <summary>
82+
/// Test the property 'Confidence'
83+
/// </summary>
84+
[Fact]
85+
public void ConfidenceTest()
86+
{
87+
Assert.IsType<double>(instance.Confidence);
88+
Assert.Equal(0.9, instance.Confidence);
89+
}
90+
91+
/// <summary>
92+
/// Test the property 'StartTimeSeconds'
93+
/// </summary>
94+
[Fact]
95+
public void StartTimeSecondsTest()
96+
{
97+
Assert.IsType<double>(instance.StartTimeSeconds);
98+
Assert.Equal(0.0, instance.StartTimeSeconds);
99+
}
100+
101+
/// <summary>
102+
/// Test the property 'EndTimeSeconds'
103+
/// </summary>
104+
[Fact]
105+
public void EndTimeSecondsTest()
106+
{
107+
Assert.IsType<double>(instance.EndTimeSeconds);
108+
Assert.Equal(1.0, instance.EndTimeSeconds);
109+
}
110+
}
111+
}

src/Bandwidth.Standard.Test/Unit/Model/RecordingTranscriptionsTests.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,15 @@ public void TranscriptsTest()
6161
instance.Transcripts = new List<Transcription>();
6262
Assert.IsType<List<Transcription>>(instance.Transcripts);
6363
}
64+
65+
/// <summary>
66+
/// Test the property 'Clips'
67+
/// </summary>
68+
[Fact]
69+
public void ClipsTest()
70+
{
71+
instance.Clips = new List<RecordingTranscriptionClip>();
72+
Assert.IsType<List<RecordingTranscriptionClip>>(instance.Clips);
73+
}
6474
}
6575
}

src/Bandwidth.Standard.Test/Unit/Model/TranscriptionTests.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ public void TranscriptionInstanceTest()
4848
Assert.IsType<Transcription>(instance);
4949
}
5050

51+
/// <summary>
52+
/// Test the property 'Speaker'
53+
/// </summary>
54+
[Fact]
55+
public void SpeakerTest()
56+
{
57+
instance.Speaker = 1;
58+
Assert.IsType<int>(instance.Speaker);
59+
Assert.Equal(1, instance.Speaker);
60+
}
5161

5262
/// <summary>
5363
/// Test the property 'Text'
@@ -59,6 +69,7 @@ public void TextTest()
5969
Assert.IsType<string>(instance.Text);
6070
Assert.Equal("test", instance.Text);
6171
}
72+
6273
/// <summary>
6374
/// Test the property 'Confidence'
6475
/// </summary>

0 commit comments

Comments
 (0)