单元测试:增加MySQL数据库测试

This commit is contained in:
Argo-Surface 2019-01-20 11:45:08 +08:00
parent 40a81b7b50
commit 4290fb65c9
2 changed files with 2 additions and 1 deletions

View File

@ -59,7 +59,7 @@ namespace UnitTest
private const string SqlConnectionStrings = "Data Source=.;Initial Catalog=UnitTest;User ID=sa;Password=sa";
private const string SQLiteConnectionStrings = "Data Source=UnitTest.db;";
private const string MySqlConnectionStrings = "Server=.;Database=UnitTest;Uid=argozhang;Pwd=argo@163.com;SslMode=none;";
private const string MySqlConnectionStrings = "Server=localhost;Database=UnitTest;Uid=argozhang;Pwd=argo@163.com;SslMode=none;";
public static void ConfigureWebHost(IWebHostBuilder builder)
{

View File

@ -10,6 +10,7 @@
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="2.2.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="2.2.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="MySql.Data" Version="8.0.13" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>