11using ModelContextProtocol . Client ;
2- using System . Collections . Generic ;
32using System . Text . Encodings . Web ;
43using System . Text . Json ;
54using System . Text . Json . Serialization ;
@@ -200,7 +199,9 @@ public async Task Think_WithPotentiallyHarmfulContent_ReturnsError()
200199 [ Fact ]
201200 public async Task Think_WithUnicodeAndEmoji_HandlesSpecialCharactersCorrectly ( )
202201 {
203- // Arrange
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
204205 var unicodeThought = "Testing emoji: 🔍 🚀 👍" ;
205206
206207 // Act
@@ -215,10 +216,15 @@ public async Task Think_WithUnicodeAndEmoji_HandlesSpecialCharactersCorrectly()
215216
216217 var response = JsonSerializer . Deserialize < ThinkResponse > ( content . Text , DefaultJsonOptions ) ;
217218 Assert . NotNull ( response ) ;
219+
220+ // Verify the thought is correctly returned
218221 Assert . Equal ( unicodeThought , response . Thought ) ;
222+
223+ // Verify at least some emoji characters are present
219224 Assert . Contains ( "🔍" , response . Thought ) ;
220225 Assert . Contains ( "🚀" , response . Thought ) ;
221226 Assert . Contains ( "👍" , response . Thought ) ;
227+
222228 Assert . NotEmpty ( response . Message ) ;
223229 Assert . Null ( response . Error ) ;
224230 }
@@ -267,8 +273,10 @@ public async Task Think_WithValidThought_ReturnsISO8601Timestamp()
267273 var response = JsonSerializer . Deserialize < ThinkResponse > ( content . Text , DefaultJsonOptions ) ;
268274 Assert . NotNull ( response ) ;
269275 Assert . NotNull ( response . Timestamp ) ;
276+
277+ // Verify ISO 8601 format
270278 Assert . True ( DateTime . TryParse ( response . Timestamp , out _ ) ) ;
271- Assert . Contains ( "T" , response . Timestamp ) ;
272- Assert . Contains ( ":" , response . Timestamp ) ;
279+ Assert . Contains ( "T" , response . Timestamp ) ; // ISO 8601 separator
280+ Assert . Contains ( ":" , response . Timestamp ) ; // Time separator
273281 }
274282}
0 commit comments