完成分类列表处理

This commit is contained in:
yubaolee
2016-10-14 17:03:18 +08:00
parent 9606a71f72
commit 7f7c0f891a
14 changed files with 710 additions and 288 deletions

View File

@@ -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>

View 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);
}
}
}
}