mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-18 17:48:01 +08:00
完成分类列表处理
This commit is contained in:
@@ -125,6 +125,7 @@
|
||||
<Compile Include="TestLogin.cs" />
|
||||
<Compile Include="TestAuthen.cs" />
|
||||
<Compile Include="TestCommonApply.cs" />
|
||||
<Compile Include="TestOrg.cs" />
|
||||
<Compile Include="TestUser.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
46
OpenAuth.UnitTest/TestOrg.cs
Normal file
46
OpenAuth.UnitTest/TestOrg.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using OpenAuth.App;
|
||||
using OpenAuth.App.ViewModel;
|
||||
using OpenAuth.Domain;
|
||||
|
||||
namespace OpenAuth.UnitTest
|
||||
{
|
||||
[TestClass]
|
||||
public class TestOrg : TestBase
|
||||
{
|
||||
private OrgManagerApp _app;
|
||||
|
||||
public TestOrg()
|
||||
{
|
||||
_app = AutofacExt.GetFromFac<OrgManagerApp>();
|
||||
}
|
||||
|
||||
|
||||
[TestMethod]
|
||||
public void Add()
|
||||
{
|
||||
try
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
var random = new Random();
|
||||
int val = random.Next();
|
||||
_app.AddOrUpdate(new Org
|
||||
{
|
||||
Id = Guid.Empty,
|
||||
Name = "test" + val,
|
||||
CreateTime = DateTime.Now,
|
||||
ParentId = null,
|
||||
ParentName = "",
|
||||
SortNo = 1
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user