From 775182ccae2a4a849b20471716e5935247b4de55 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Oct 2025 12:57:51 +0000 Subject: [PATCH 1/2] Initial plan From 7374cda3cd70a5f57275d74362875da38b737962 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Oct 2025 13:01:45 +0000 Subject: [PATCH 2/2] Remove Subscribe property from User class and tests Co-authored-by: zhenghaoz <9030120+zhenghaoz@users.noreply.github.com> --- Gorse.NET.Tests/UnitTests/TestUsersAPI.cs | 17 +++++------------ Gorse.NET/Models/User.cs | 1 - 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/Gorse.NET.Tests/UnitTests/TestUsersAPI.cs b/Gorse.NET.Tests/UnitTests/TestUsersAPI.cs index f9dc38f..5c7c069 100644 --- a/Gorse.NET.Tests/UnitTests/TestUsersAPI.cs +++ b/Gorse.NET.Tests/UnitTests/TestUsersAPI.cs @@ -16,8 +16,7 @@ public void TestUserLifecycle() { UserId = "user123", Labels = new string[] { "outgoing", "optimistic", "creative" }, - Comment = "Initial user creation", - Subscribe = new string[] { "news", "updates", "offers" } + Comment = "Initial user creation" }; var rowAffected = client.InsertUser(user); Assert.That(rowAffected.RowAffected, Is.EqualTo(1)); @@ -29,7 +28,6 @@ public void TestUserLifecycle() // Update the user with new details user.Labels = new string[] { "introverted", "thoughtful", "analytical" }; user.Comment = "Updated user profile"; - user.Subscribe = new string[] { "promotions", "alerts", "newsletters" }; rowAffected = client.UpdateUser(user.UserId, user); Assert.That(rowAffected.RowAffected, Is.EqualTo(1)); @@ -72,7 +70,6 @@ public async Task TestUserLifecycleAsync() // Update the user with new details user.Labels = new string[] { "introverted", "thoughtful", "analytical" }; user.Comment = "Updated user profile"; // Updated comment - user.Subscribe = new string[] { "promotions", "alerts", "newsletters" }; rowAffected = await client.UpdateUserAsync(user.UserId, user); Assert.That(rowAffected.RowAffected, Is.EqualTo(1)); @@ -105,14 +102,12 @@ public void TestUsersBatch() new User{ UserId = "user123", Labels = new string[] { "outgoing", "optimistic", "creative" }, - Comment = "Initial user creation", - Subscribe = new string[] { "news", "updates", "offers" } + Comment = "Initial user creation" }, new User{ UserId = "user456", Labels = new string[] { "introverted", "thoughtful", "analytical" }, - Comment = "Second user creation", - Subscribe = new string[] { "promotions", "alerts", "newsletters" } + Comment = "Second user creation" }, }; @@ -158,14 +153,12 @@ public async Task TestUsersBatchAsync() new User{ UserId = "user123", Labels = new string[] { "outgoing", "optimistic", "creative" }, - Comment = "Initial user creation", - Subscribe = new string[] { "news", "updates", "offers" } + Comment = "Initial user creation" }, new User{ UserId = "user456", // Descriptive UserId Labels = new string[] { "introverted", "thoughtful", "analytical" }, - Comment = "Second user creation", - Subscribe = new string[] { "promotions", "alerts", "newsletters" } + Comment = "Second user creation" }, }; diff --git a/Gorse.NET/Models/User.cs b/Gorse.NET/Models/User.cs index aecb7cb..fdf4b8d 100644 --- a/Gorse.NET/Models/User.cs +++ b/Gorse.NET/Models/User.cs @@ -7,7 +7,6 @@ public class User public string UserId { set; get; } = ""; public string[] Labels { set; get; } = Array.Empty(); public string Comment { get; set; } = ""; - public string[] Subscribe { get; set; } = Array.Empty(); public override bool Equals(object? obj) => obj is User other && this.Equals(other); public bool Equals(User user) => UserId.Equals(user.UserId) && Enumerable.SequenceEqual(Labels, user.Labels);