单元测试:增加MySQL数据库测试
This commit is contained in:
parent
40a81b7b50
commit
4290fb65c9
|
@ -59,7 +59,7 @@ namespace UnitTest
|
||||||
|
|
||||||
private const string SqlConnectionStrings = "Data Source=.;Initial Catalog=UnitTest;User ID=sa;Password=sa";
|
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 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)
|
public static void ConfigureWebHost(IWebHostBuilder builder)
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="2.2.0" />
|
||||||
<PackageReference Include="Microsoft.Data.Sqlite" Version="2.2.1" />
|
<PackageReference Include="Microsoft.Data.Sqlite" Version="2.2.1" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
|
<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" Version="2.4.1" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
|
Loading…
Reference in New Issue