Skip to content

Commit

Permalink
feat: implement request path for Start in ExperienceComposer
Browse files Browse the repository at this point in the history
  • Loading branch information
Tr00d committed Jun 24, 2024
1 parent 3eedf52 commit ab9490e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions Vonage.Test/Video/ExperienceComposer/Start/RequestTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using System;
using Vonage.Server;
using Vonage.Test.Common.Extensions;
using Vonage.Video.ExperienceComposer.Start;
using Xunit;

namespace Vonage.Test.Video.ExperienceComposer.Start;

[Trait("Category", "Request")]
public class RequestTest
{
[Fact]
public void GetEndpointPath_ShouldReturnApiEndpoint() =>
StartRequest
.Build()
.WithApplicationId(new Guid("301cf3c3-0027-4578-b212-dac7e924e85b"))
.WithSessionId("irrelevant")
.WithToken("irrelevant")
.WithUrl(new Uri("https://irrelevant.com"))
.WithResolution(RenderResolution.StandardDefinitionLandscape)
.WithName("irrelevant")
.Create()
.Map(request => request.GetEndpointPath())
.Should()
.BeSuccess("/v2/project/301cf3c3-0027-4578-b212-dac7e924e85b/render");
}
2 changes: 1 addition & 1 deletion Vonage/Video/ExperienceComposer/Start/StartRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public struct StartRequest : IVonageRequest
public HttpRequestMessage BuildRequestMessage() => throw new NotImplementedException();

/// <inheritdoc />
public string GetEndpointPath() => throw new NotImplementedException();
public string GetEndpointPath() => $"/v2/project/{this.ApplicationId}/render";

/// <summary>
/// Initializes a builder.
Expand Down

0 comments on commit ab9490e

Please sign in to comment.