From d1e8cf5da3a1e4b7930dc44ca515acf8e9f8db82 Mon Sep 17 00:00:00 2001 From: Aditya Agarwal Date: Tue, 15 Oct 2024 14:33:51 +0200 Subject: [PATCH] fix json recommended_action naming, enable tests --- src/Models/Activity.cs | 2 ++ tests/ModerationTests.cs | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Models/Activity.cs b/src/Models/Activity.cs index 109a1a7..83ba0dd 100644 --- a/src/Models/Activity.cs +++ b/src/Models/Activity.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using Newtonsoft.Json; namespace Stream.Models { @@ -46,6 +47,7 @@ public class AddActivitiesResponse : ResponseBase public class ModerationResponse { public string Status { get; set; } + [JsonProperty("recommended_action")] public string RecommendedAction { get; set; } public APIError APIError { get; set; } } diff --git a/tests/ModerationTests.cs b/tests/ModerationTests.cs index 82221f1..1f8cced 100644 --- a/tests/ModerationTests.cs +++ b/tests/ModerationTests.cs @@ -12,7 +12,6 @@ namespace StreamNetTests public class ModerationTests : TestBase { [Test] - [Ignore("The api is not deployed yet")] public async Task TestModerationTemplate() { var newActivity2 = new Activity("1", "test", "2") @@ -39,7 +38,6 @@ public async Task TestModerationTemplate() } [Test] - [Ignore("The api is not deployed yet")] public async Task TestReactionModeration() { var a = new Activity("user:1", "like", "cake") @@ -70,7 +68,6 @@ public async Task TestReactionModeration() } [Test] - [Ignore("The api is not deployed yet")] public async Task TestFlagUser() { var userId = Guid.NewGuid().ToString(); @@ -91,7 +88,6 @@ public async Task TestFlagUser() } [Test] - [Ignore("The api is not deployed yet")] public async Task TestFlagActivity() { var newActivity = new Activity("vishal", "test", "1"); @@ -108,7 +104,6 @@ public async Task TestFlagActivity() } [Test] - [Ignore("The api is not deployed yet")] public async Task TestFlagReaction() { var a = new Activity("user:1", "like", "cake")