@@ -32,7 +32,9 @@ public async Task TestCallTool()
3232 {
3333 var result = await client . CallToolAsync ( "Hello" ) ;
3434 string response = result . Content [ 0 ] . Text ;
35+
3536 Assert . AreEqual ( "hello, claude." , response ) ;
37+ Assert . AreEqual ( "text" , result . Content [ 0 ] . Type ) ;
3638 }
3739
3840 [ TestCategory ( "Tools" ) ]
@@ -42,6 +44,8 @@ public async Task TestCallDynamicTool()
4244 var result = await client . CallToolAsync ( "dynamicTool" , new Dictionary < string , object > { { "input" , "test string" } , { "input2" , "another string" } } ) ;
4345 string response = result . Content [ 0 ] . Text ;
4446 Assert . AreEqual ( "hello, test string.\n another string" , response ) ;
47+ Assert . AreEqual ( "text" , result . Content [ 0 ] . Type ) ;
48+
4549 }
4650
4751 [ TestCategory ( "Tools" ) ]
@@ -51,6 +55,8 @@ public async Task TestCallTool_semantic()
5155 var result = await client . CallToolAsync ( "SemanticTest" ) ;
5256 string response = result . Content [ 0 ] . Text ;
5357 Assert . AreEqual ( "success" , response ) ;
58+ Assert . AreEqual ( "text" , result . Content [ 0 ] . Type ) ;
59+
5460 }
5561
5662 [ TestCategory ( "Tools" ) ]
@@ -61,6 +67,8 @@ public async Task TestCallToolWithParameters()
6167 Assert . IsFalse ( result . IsError ) ;
6268 string response = result . Content [ 0 ] . Text ;
6369 Assert . AreEqual ( "this is a test of the echo function" , response ) ;
70+ Assert . AreEqual ( "text" , result . Content [ 0 ] . Type ) ;
71+
6472 }
6573
6674 [ TestCategory ( "Misc" ) ]
@@ -70,6 +78,8 @@ public async Task TestException()
7078 var result = await client . CallToolAsync ( "throw_exception" ) ;
7179 string response = result . Content [ 0 ] . Text ;
7280 Assert . AreEqual ( "This is an exception" , response ) ;
81+ Assert . AreEqual ( "text" , result . Content [ 0 ] . Type ) ;
82+
7383 }
7484
7585 [ TestCategory ( "Tools" ) ]
@@ -94,6 +104,8 @@ public async Task TestCallExternalTool()
94104 var result = await client . CallToolAsync ( "dll-tool" ) ;
95105 string response = result . Content [ 0 ] . Text ;
96106 Assert . AreEqual ( "success" , response ) ;
107+ Assert . AreEqual ( "text" , result . Content [ 0 ] . Type ) ;
108+
97109 }
98110
99111
@@ -131,6 +143,8 @@ public async Task TestCallToolWithParameterObject()
131143 var result = await client . CallToolAsync ( "AddComplex" , new Dictionary < string , object > { { "obj" , new ComplicatedObject { Name = "Claude" , Age = 25 , Hobbies = [ "Programming" , "Gaming" ] } } } ) ;
132144 string response = result . Content [ 0 ] . Text ;
133145 Assert . AreEqual ( "Name: Claude, Age: 25, Hobbies: Programming, Gaming" , response ) ;
134- }
146+ Assert . AreEqual ( "text" , result . Content [ 0 ] . Type ) ;
147+
148+ }
135149 }
136150}
0 commit comments