Skip to content

Commit 40e281d

Browse files
committed
Removed workaround for testing.
1 parent 0d7e7bd commit 40e281d

File tree

1 file changed

+1
-10
lines changed
  • test/AbpCompanyName.AbpProjectName.Web.Tests

1 file changed

+1
-10
lines changed

test/AbpCompanyName.AbpProjectName.Web.Tests/Startup.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
using Abp.AspNetCore.TestBase;
55
using Abp.Dependency;
66
using AbpCompanyName.AbpProjectName.EntityFrameworkCore;
7-
using AbpCompanyName.AbpProjectName.Web.Controllers;
87
using Castle.MicroKernel.Registration;
98
using Microsoft.AspNetCore.Builder;
109
using Microsoft.AspNetCore.Hosting;
11-
using Microsoft.AspNetCore.Mvc.ApplicationParts;
1210
using Microsoft.EntityFrameworkCore;
1311
using Microsoft.Extensions.DependencyInjection;
1412
using Microsoft.Extensions.Logging;
@@ -21,18 +19,11 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
2119
{
2220
services.AddEntityFrameworkInMemoryDatabase();
2321

24-
var mvc = services.AddMvc(options =>
22+
services.AddMvc(options =>
2523
{
2624
options.AddAbp(services); //Add ABP infrastructure to MVC
2725
});
2826

29-
//Workaround defined here: https://github.com/aspnet/Mvc/issues/4897#issuecomment-228093609
30-
var parts = mvc.PartManager.ApplicationParts;
31-
parts.Clear();
32-
parts.Add(new AssemblyPart(typeof(HomeController).Assembly));
33-
34-
mvc.AddControllersAsServices();
35-
3627
//Configure Abp and Dependency Injection
3728
return services.AddAbp<AbpProjectNameWebTestModule>(options =>
3829
{

0 commit comments

Comments
 (0)