@@ -211,6 +211,11 @@ public async Task Can_Elicit_Typed_Information()
211211 [ Fact ]
212212 public async Task Can_Elicit_Typed_Information_No_SerializationOptions ( )
213213 {
214+ if ( JsonSerializer . IsReflectionEnabledByDefault is false )
215+ {
216+ Assert . Skip ( "Reflection is disabled by default. This test requires reflection to be enabled." ) ;
217+ }
218+
214219 await using McpClient client = await CreateMcpClientForServer ( new McpClientOptions
215220 {
216221 Capabilities = new ( )
@@ -230,33 +235,33 @@ public async Task Can_Elicit_Typed_Information_No_SerializationOptions()
230235 var value = entry . Value ;
231236 switch ( key )
232237 {
233- case nameof ( SampleForm . Name ) :
238+ case "name" :
234239 var stringSchema = Assert . IsType < ElicitRequestParams . StringSchema > ( value ) ;
235240 Assert . Equal ( "string" , stringSchema . Type ) ;
236241 break ;
237242
238- case nameof ( SampleForm . Age ) :
243+ case "age" :
239244 var intSchema = Assert . IsType < ElicitRequestParams . NumberSchema > ( value ) ;
240245 Assert . Equal ( "integer" , intSchema . Type ) ;
241246 break ;
242247
243- case nameof ( SampleForm . Active ) :
248+ case "active" :
244249 var boolSchema = Assert . IsType < ElicitRequestParams . BooleanSchema > ( value ) ;
245250 Assert . Equal ( "boolean" , boolSchema . Type ) ;
246251 break ;
247252
248- case nameof ( SampleForm . Role ) :
253+ case "role" :
249254 var enumSchema = Assert . IsType < ElicitRequestParams . EnumSchema > ( value ) ;
250255 Assert . Equal ( "string" , enumSchema . Type ) ;
251256 Assert . Equal ( [ nameof ( SampleRole . User ) , nameof ( SampleRole . Admin ) ] , enumSchema . Enum ) ;
252257 break ;
253258
254- case nameof ( SampleForm . Score ) :
259+ case "score" :
255260 var numSchema = Assert . IsType < ElicitRequestParams . NumberSchema > ( value ) ;
256261 Assert . Equal ( "number" , numSchema . Type ) ;
257262 break ;
258263
259- case nameof ( SampleForm . Created ) :
264+ case "created" :
260265 var dateTimeSchema = Assert . IsType < ElicitRequestParams . StringSchema > ( value ) ;
261266 Assert . Equal ( "string" , dateTimeSchema . Type ) ;
262267 Assert . Equal ( "date-time" , dateTimeSchema . Format ) ;
0 commit comments