Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion ApiClient.Tests/Api/ApiTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class ApiTest
public void StartMockServer()
{
CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;

WireMockServer = WireMockServer.Start();

Configuration = new Configuration
Expand Down
27 changes: 15 additions & 12 deletions ApiClient.Tests/Api/CallRoutingApiTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Infobip.Api.Client.Api;
using Infobip.Api.Client.Api;
using Infobip.Api.Client.Model;
using Newtonsoft.Json;
using JsonSerializer = System.Text.Json.JsonSerializer;
Expand Down Expand Up @@ -167,12 +167,14 @@ void AssertCallRoutingRouteResponsePage(CallRoutingRouteResponsePage callRouting
Assert.AreEqual(expectedTotalResults, callRoutingRouteResponsePage.Paging.TotalResults);
}

AssertResponse(callRoutingApi.GetCallRoutes(givenPage, givenSize), AssertCallRoutingRouteResponsePage);
AssertResponse(callRoutingApi.GetCallRoutesAsync(givenPage, givenSize).Result,
AssertResponse(callRoutingApi.GetCallRoutes(page: givenPage, size: givenSize),
AssertCallRoutingRouteResponsePage);
AssertResponseWithHttpInfo(callRoutingApi.GetCallRoutesWithHttpInfo(givenPage, givenSize),
AssertResponse(callRoutingApi.GetCallRoutesAsync(page: givenPage, size: givenSize).Result,
AssertCallRoutingRouteResponsePage);
AssertResponseWithHttpInfo(callRoutingApi.GetCallRoutesWithHttpInfo(page: givenPage, size: givenSize),
AssertCallRoutingRouteResponsePage, 200);
AssertResponseWithHttpInfo(callRoutingApi.GetCallRoutesWithHttpInfoAsync(givenPage, givenSize).Result,
AssertResponseWithHttpInfo(
callRoutingApi.GetCallRoutesWithHttpInfoAsync(page: givenPage, size: givenSize).Result,
AssertCallRoutingRouteResponsePage, 200);
}

Expand Down Expand Up @@ -273,9 +275,9 @@ public void ShouldCreateCallRoute()
{
new CallRoutingEndpointDestination(
new CallRoutingSipEndpoint(
givenUsername,
givenSipTrunkId,
new Dictionary<string, string> { { "Header-Name", givenHeaderName } }
username: givenUsername,
sipTrunkId: givenSipTrunkId,
customHeaders: new Dictionary<string, string> { { "Header-Name", givenHeaderName } }
),
givenConnectionTimeout,
new CallRoutingRecording(
Expand Down Expand Up @@ -494,9 +496,9 @@ public void ShouldUpdateCallRoutes()
{
new CallRoutingEndpointDestination(
new CallRoutingSipEndpoint(
givenUsername,
givenSipTrunkId,
new Dictionary<string, string> { { "Header-Name", givenHeaderName } }
username: givenUsername,
sipTrunkId: givenSipTrunkId,
customHeaders: new Dictionary<string, string> { { "Header-Name", givenHeaderName } }
),
givenConnectionTimeout,
new CallRoutingRecording(
Expand Down Expand Up @@ -688,7 +690,8 @@ void AssertCallRoutingEndpointDestinationResponse(
Assert.AreEqual(expectedSipTrunkId, callRoutingSipEndpoint.SipTrunkId);

Assert.AreEqual(expectedConnectTimeout, callRoutingEndpointDestinationResponse.ConnectTimeout);
Assert.AreEqual(expectedRecordingType, GetEnumAttributeValue(callRoutingEndpointDestinationResponse.Recording.RecordingType));
Assert.AreEqual(expectedRecordingType,
GetEnumAttributeValue(callRoutingEndpointDestinationResponse.Recording.RecordingType));
}

void AssertCallRoutingUrlDestinationHttpRequest(
Expand Down
Loading
Loading