feature:添加集成测试

This commit is contained in:
2021-05-19 09:38:46 +08:00
parent 5019f78817
commit 38a4f32fa2
4 changed files with 97 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc.Testing;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Ewide.Test
{
public class CustomWebApplicationFactory<TStartup> : WebApplicationFactory<TStartup> where TStartup : class
{
protected override void ConfigureWebHost(IWebHostBuilder builder)
{
builder.UseEnvironment("Testing");
}
}
}