diff --git a/Source/ZoomNet.UnitTests/Models/ChatbotValidateTests.cs b/Source/ZoomNet.UnitTests/Models/ChatbotValidateTests.cs
index 9485e5c8..178829fe 100644
--- a/Source/ZoomNet.UnitTests/Models/ChatbotValidateTests.cs
+++ b/Source/ZoomNet.UnitTests/Models/ChatbotValidateTests.cs
@@ -3,7 +3,7 @@
using Xunit;
using ZoomNet.Models.ChatbotMessage;
-namespace ZoomNet.UnitTests.Resources
+namespace ZoomNet.UnitTests.Models
{
public class ChatbotValidateTests
{
diff --git a/Source/ZoomNet.UnitTests/Models/DashboardParticipant.cs b/Source/ZoomNet.UnitTests/Models/DashboardParticipant.cs
index 0805ccc2..d8f8a25f 100644
--- a/Source/ZoomNet.UnitTests/Models/DashboardParticipant.cs
+++ b/Source/ZoomNet.UnitTests/Models/DashboardParticipant.cs
@@ -4,7 +4,7 @@
using ZoomNet.Json;
using ZoomNet.Models;
-namespace ZoomNet.UnitTests.Resources
+namespace ZoomNet.UnitTests.Models
{
public class DashboardParticipantTests
{
diff --git a/Source/ZoomNet.UnitTests/Models/Registrant.cs b/Source/ZoomNet.UnitTests/Models/Registrant.cs
index c0881e36..414b4361 100644
--- a/Source/ZoomNet.UnitTests/Models/Registrant.cs
+++ b/Source/ZoomNet.UnitTests/Models/Registrant.cs
@@ -4,7 +4,7 @@
using ZoomNet.Json;
using ZoomNet.Models;
-namespace ZoomNet.UnitTests.Resources
+namespace ZoomNet.UnitTests.Models
{
public class RegistrantTests
{
@@ -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");
}
}
}
diff --git a/Source/ZoomNet.UnitTests/Resources/AccountCallLogsTests.cs b/Source/ZoomNet.UnitTests/Resources/AccountCallLogsTests.cs
index 254b38f5..3675e8ca 100644
--- a/Source/ZoomNet.UnitTests/Resources/AccountCallLogsTests.cs
+++ b/Source/ZoomNet.UnitTests/Resources/AccountCallLogsTests.cs
@@ -12,7 +12,8 @@
namespace ZoomNet.UnitTests.Resources
{
- public class AccountCallLogsTests {
+ public class AccountCallLogsTests
+ {
#region FIELDS
private const string SINGLE_ACCOUNT_CALL_LOGS_JSON = @"
@@ -237,7 +238,7 @@ public class AccountCallLogsTests {
]
}
";
-
+
#endregion
[Fact]
diff --git a/Source/ZoomNet/Json/CustomQuestionsAnswersConverter.cs b/Source/ZoomNet/Json/CustomQuestionsAnswersConverter.cs
new file mode 100644
index 00000000..8f42c7b7
--- /dev/null
+++ b/Source/ZoomNet/Json/CustomQuestionsAnswersConverter.cs
@@ -0,0 +1,16 @@
+using System.Collections.Generic;
+
+namespace ZoomNet.Json
+{
+ ///
+ /// Converts an array of to or from JSON.
+ ///
+ ///
+ internal class CustomQuestionsAnswersConverter : KeyValuePairConverter
+ {
+ public CustomQuestionsAnswersConverter()
+ : base("title", "value")
+ {
+ }
+ }
+}
diff --git a/Source/ZoomNet/Models/Registrant.cs b/Source/ZoomNet/Models/Registrant.cs
index 10091bce..159406f1 100644
--- a/Source/ZoomNet/Models/Registrant.cs
+++ b/Source/ZoomNet/Models/Registrant.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
+using ZoomNet.Json;
namespace ZoomNet.Models
{
@@ -118,6 +119,7 @@ public class Registrant
/// Gets or sets the custom questions.
///
[JsonPropertyName("custom_questions")]
+ [JsonConverter(typeof(CustomQuestionsAnswersConverter))]
public KeyValuePair[] CustomQuestions { get; set; }
///
diff --git a/build.cake b/build.cake
index 9c2d6498..b083390c 100644
--- a/build.cake
+++ b/build.cake
@@ -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.