Skip to content

Commit a0b577f

Browse files
committed
test: Update ThinkOperationTests to include additional Unicode characters in assertions
- Modified the test case to include Chinese characters alongside existing emoji, ensuring proper handling of special characters in responses.
1 parent 2190d2d commit a0b577f

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

tests/NetContextServer/ThinkOperationTests.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,8 @@ public async Task Think_WithPotentiallyHarmfulContent_ReturnsError()
199199
[Fact]
200200
public async Task Think_WithUnicodeAndEmoji_HandlesSpecialCharactersCorrectly()
201201
{
202-
// Arrange - Use only emoji that work well with the MCP protocol
203-
// Note: While Chinese characters may display as question marks in some contexts,
204-
// common emoji are correctly preserved in the JSON responses
205-
var unicodeThought = "Testing emoji: 🔍 🚀 👍";
202+
// Arrange
203+
var unicodeThought = "Testing emoji: 🔍 🚀 👍 上下文伺服器";
206204

207205
// Act
208206
var result = await _client.CallToolAsync("think",
@@ -224,7 +222,8 @@ public async Task Think_WithUnicodeAndEmoji_HandlesSpecialCharactersCorrectly()
224222
Assert.Contains("🔍", response.Thought);
225223
Assert.Contains("🚀", response.Thought);
226224
Assert.Contains("👍", response.Thought);
227-
225+
Assert.Contains("上下文伺服器", response.Thought);
226+
228227
Assert.NotEmpty(response.Message);
229228
Assert.Null(response.Error);
230229
}

0 commit comments

Comments
 (0)