You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Mvc/Mvc.ApiExplorer/test/EndpointMetadataApiDescriptionProviderTest.cs
+42-4Lines changed: 42 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -336,7 +336,7 @@ public void AddsResponseDescription_WorksWithGenerics()
336
336
{
337
337
conststringexpectedOkDescription="The weather forecast for the next 5 days.";
338
338
339
-
varapiDescription=GetApiDescription([ProducesResponseType<GenericClass<TimeSpan>>(StatusCodes.Status200OK,Description="The weather forecast for the next 5 days.")]
@@ -355,7 +355,7 @@ public void AddsResponseDescription_WorksWithGenericsAndTypedResults()
355
355
{
356
356
conststringexpectedOkDescription="The weather forecast for the next 5 days.";
357
357
358
-
varapiDescription=GetApiDescription([ProducesResponseType<GenericClass<TimeSpan>>(StatusCodes.Status200OK,Description="The weather forecast for the next 5 days.")]
@@ -374,7 +374,7 @@ public void AddsResponseDescription_WorksWithCollections()
374
374
{
375
375
conststringexpectedOkDescription="The weather forecast for the next 5 days.";
376
376
377
-
varapiDescription=GetApiDescription([ProducesResponseType<IEnumerable<TimeSpan>>(StatusCodes.Status200OK,Description="The weather forecast for the next 5 days.")]
@@ -393,7 +393,7 @@ public void AddsResponseDescription_WorksWithCollectionsAndTypedResults()
393
393
{
394
394
conststringexpectedOkDescription="The weather forecast for the next 5 days.";
395
395
396
-
varapiDescription=GetApiDescription([ProducesResponseType<IEnumerable<TimeSpan>>(StatusCodes.Status200OK,Description="The weather forecast for the next 5 days.")]
Assert.Equal(typeof(IEnumerable<TimeSpan>),okResponseType.Type);// We use IEnumerable<TimeSpan> as the inferred type has higher priority than those set by metadata (attributes)
Assert.Equal(typeof(IEnumerable<TimeSpan>),okResponseType.Type);// We use IEnumerable<TimeSpan> as the inferred type has higher priority than those set by metadata (attributes)
0 commit comments