升级工程:升级组件,更新单元测试
This commit is contained in:
parent
96b52478b9
commit
12c53eeead
|
@ -14,7 +14,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Bootstrap.Security.Mvc" Version="2.2.0" />
|
||||
<PackageReference Include="Longbow.Logging" Version="2.2.4" />
|
||||
<PackageReference Include="Longbow.Logging" Version="2.2.5" />
|
||||
<PackageReference Include="Longbow.Web" Version="2.2.2" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="2.3.0" />
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Bootstrap.Security.DataAccess" Version="1.1.0" />
|
||||
<PackageReference Include="Longbow.Cache" Version="2.2.0" />
|
||||
<PackageReference Include="Longbow.Web" Version="2.2.0" />
|
||||
<PackageReference Include="Bootstrap.Security.DataAccess" Version="1.1.1" />
|
||||
<PackageReference Include="Longbow.Cache" Version="2.2.2" />
|
||||
<PackageReference Include="Longbow.Web" Version="2.2.2" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Bootstrap.Security.Mvc" Version="2.2.0" />
|
||||
<PackageReference Include="Longbow.Cache" Version="2.2.0" />
|
||||
<PackageReference Include="Longbow.Logging" Version="2.2.1" />
|
||||
<PackageReference Include="Longbow.Web" Version="2.2.0" />
|
||||
<PackageReference Include="Longbow.Cache" Version="2.2.2" />
|
||||
<PackageReference Include="Longbow.Logging" Version="2.2.5" />
|
||||
<PackageReference Include="Longbow.Web" Version="2.2.2" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Bootstrap.Security.DataAccess" Version="1.1.1" />
|
||||
<PackageReference Include="Longbow.Data" Version="2.2.2" />
|
||||
<PackageReference Include="Longbow.Security.Cryptography" Version="1.2.0" />
|
||||
<PackageReference Include="Longbow.Security.Cryptography" Version="1.3.0" />
|
||||
<PackageReference Include="Longbow.Web" Version="2.2.2" />
|
||||
<PackageReference Include="Longbow.Cache" Version="2.2.1" />
|
||||
<PackageReference Include="Longbow.Cache" Version="2.2.2" />
|
||||
<PackageReference Include="Longbow" Version="2.2.3" />
|
||||
<PackageReference Include="PetaPoco.Compiled" Version="1.0.1" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#define SQLite
|
||||
//#define SQLite
|
||||
//#define MySQL
|
||||
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using Xunit;
|
||||
using System.Linq;
|
||||
using Xunit;
|
||||
|
||||
namespace Bootstrap.DataAccess
|
||||
{
|
||||
|
@ -45,9 +46,9 @@ namespace Bootstrap.DataAccess
|
|||
public void RetrieveRolesByMenuId_Ok()
|
||||
{
|
||||
var menu = new Menu();
|
||||
menu.SaveMenusByRoleId("1", new string[] { "1" });
|
||||
|
||||
var role = new Role();
|
||||
var id = role.Retrieves().FirstOrDefault(r => r.RoleName == "Administrators").Id;
|
||||
menu.SaveMenusByRoleId(id, new string[] { "1" });
|
||||
var rs = role.RetrievesByMenuId("1");
|
||||
Assert.Contains(rs, r => r.Checked == "checked");
|
||||
}
|
||||
|
@ -63,6 +64,8 @@ namespace Bootstrap.DataAccess
|
|||
public void RetrieveRolesByGroupId_Ok()
|
||||
{
|
||||
var role = new Role();
|
||||
var id = role.Retrieves().FirstOrDefault(r => r.RoleName == "Administrators").Id;
|
||||
new Group().SaveByRoleId(id, new string[] { "1" });
|
||||
Assert.Contains(role.RetrievesByGroupId("1"), r => r.Checked == "checked");
|
||||
}
|
||||
|
||||
|
@ -70,6 +73,8 @@ namespace Bootstrap.DataAccess
|
|||
public void RetrieveRolesByUserName_Ok()
|
||||
{
|
||||
var role = new Role();
|
||||
var id = role.Retrieves().FirstOrDefault(r => r.RoleName == "Administrators").Id;
|
||||
new User().SaveByRoleId(id, new string[] { "1" });
|
||||
Assert.NotEmpty(role.RetrieveRolesByUserName("Admin"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue