From b6f114353d0634d55ffaafd96c78222c0898ca42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Wed, 18 Mar 2020 19:47:59 +0300 Subject: [PATCH] Added test --- .../ApiExploring/AbpApiDefinitionController_Tests.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpApiDefinitionController_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpApiDefinitionController_Tests.cs index 44b206e462..8dbbf3eac2 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpApiDefinitionController_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpApiDefinitionController_Tests.cs @@ -1,4 +1,5 @@ -using System.Threading.Tasks; +using System.Collections.Generic; +using System.Threading.Tasks; using Shouldly; using Volo.Abp.Http.Modeling; using Xunit; @@ -12,6 +13,15 @@ namespace Volo.Abp.AspNetCore.Mvc.ApiExploring { var model = await GetResponseAsObjectAsync("/api/abp/api-definition"); model.ShouldNotBeNull(); + model.Types.IsNullOrEmpty().ShouldBeTrue(); + } + + [Fact] + public async Task GetAsync_IncludeTypes() + { + var model = await GetResponseAsObjectAsync("/api/abp/api-definition?includeTypes=true"); + model.ShouldNotBeNull(); + model.Types.IsNullOrEmpty().ShouldBeFalse(); } } }