Skip to content

Commit

Permalink
Merge branch 'release/0.72.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jericho committed Dec 9, 2023
2 parents 511444d + 0dc8f37 commit 54f05c0
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Source/ZoomNet.UnitTests/Models/ChatbotValidateTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Xunit;
using ZoomNet.Models.ChatbotMessage;

namespace ZoomNet.UnitTests.Resources
namespace ZoomNet.UnitTests.Models
{
public class ChatbotValidateTests
{
Expand Down
2 changes: 1 addition & 1 deletion Source/ZoomNet.UnitTests/Models/DashboardParticipant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using ZoomNet.Json;
using ZoomNet.Models;

namespace ZoomNet.UnitTests.Resources
namespace ZoomNet.UnitTests.Models
{
public class DashboardParticipantTests
{
Expand Down
6 changes: 5 additions & 1 deletion Source/ZoomNet.UnitTests/Models/Registrant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using ZoomNet.Json;
using ZoomNet.Models;

namespace ZoomNet.UnitTests.Resources
namespace ZoomNet.UnitTests.Models
{
public class RegistrantTests
{
Expand Down Expand Up @@ -57,6 +57,10 @@ public void Parse_json()
result.RoleInPurchaseProcess.ShouldBe(RoleInPurchaseProcess.Influencer);
result.State.ShouldBe("CA");
result.Status.ShouldBe(RegistrantStatus.Approved);
result.CustomQuestions.ShouldNotBeNull();
result.CustomQuestions.Length.ShouldBe(1);
result.CustomQuestions[0].Key.ShouldBe("What do you hope to learn from this Webinar?");
result.CustomQuestions[0].Value.ShouldStartWith("Look forward to learning");
}
}
}
5 changes: 3 additions & 2 deletions Source/ZoomNet.UnitTests/Resources/AccountCallLogsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

namespace ZoomNet.UnitTests.Resources
{
public class AccountCallLogsTests {
public class AccountCallLogsTests
{
#region FIELDS

private const string SINGLE_ACCOUNT_CALL_LOGS_JSON = @"
Expand Down Expand Up @@ -237,7 +238,7 @@ public class AccountCallLogsTests {
]
}
";

#endregion

[Fact]
Expand Down
16 changes: 16 additions & 0 deletions Source/ZoomNet/Json/CustomQuestionsAnswersConverter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System.Collections.Generic;

namespace ZoomNet.Json
{
/// <summary>
/// Converts an array of <see cref="KeyValuePair{String, String}"/> to or from JSON.
/// </summary>
/// <seealso cref="KeyValuePairConverter"/>
internal class CustomQuestionsAnswersConverter : KeyValuePairConverter
{
public CustomQuestionsAnswersConverter()
: base("title", "value")
{
}
}
}
2 changes: 2 additions & 0 deletions Source/ZoomNet/Models/Registrant.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
using ZoomNet.Json;

namespace ZoomNet.Models
{
Expand Down Expand Up @@ -118,6 +119,7 @@ public class Registrant
/// Gets or sets the custom questions.
/// </summary>
[JsonPropertyName("custom_questions")]
[JsonConverter(typeof(CustomQuestionsAnswersConverter))]
public KeyValuePair<string, string>[] CustomQuestions { get; set; }

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions build.cake
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Install tools.
#tool dotnet:?package=GitVersion.Tool&version=5.12.0
#tool dotnet:?package=coveralls.net&version=4.0.1
#tool nuget:?package=GitReleaseManager&version=0.16.0
#tool nuget:https://f.feedz.io/jericho/jericho/nuget/?package=GitReleaseManager&version=0.17.0-collaborators0003
#tool nuget:?package=ReportGenerator&version=5.2.0
#tool nuget:?package=xunit.runner.console&version=2.6.2
#tool nuget:?package=xunit.runner.console&version=2.6.3
#tool nuget:?package=CodecovUploader&version=0.7.1

// Install addins.
Expand Down

0 comments on commit 54f05c0

Please sign in to comment.