mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-11-08 10:24:44 +08:00
调整结构
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using Infrastructure;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using OpenAuth.Domain.Service;
|
||||
using OpenAuth.Repository;
|
||||
@@ -17,7 +20,10 @@ namespace OpenAuth.UnitTest
|
||||
AuthoriseFactory factory = new AuthoriseFactory(new UnitWork() );
|
||||
var service= factory.Create("System");
|
||||
|
||||
var orgs = service.Orgs;
|
||||
var modules = service.Modules;
|
||||
|
||||
var moduleTree = modules.GenerateTree(u => u.Id, u => u.ParentId).ToList();
|
||||
Debug.WriteLine(JsonHelper.Instance.Serialize(moduleTree));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace OpenAuth.UnitTest
|
||||
int val = random.Next();
|
||||
_app.AddOrUpdate(new Org
|
||||
{
|
||||
Id = Guid.Empty,
|
||||
Id = string.Empty,
|
||||
Name = "test" + val,
|
||||
CreateTime = DateTime.Now,
|
||||
ParentId = null,
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace OpenAuth.UnitTest
|
||||
[TestMethod]
|
||||
public void GetUser()
|
||||
{
|
||||
var users = _app.Load(new Guid("990cb229-cc18-41f3-8e2b-13f0f0110798"), 2, 30);
|
||||
var users = _app.Load("990cb229-cc18-41f3-8e2b-13f0f0110798", 2, 30);
|
||||
|
||||
Console.WriteLine(users.total);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace OpenAuth.UnitTest
|
||||
string name = "请假" + DateTime.Now.ToString("yy-mm-dd_HH_mm_ss");
|
||||
string str ="{\"Code\":\"请病假\",\"CustomName\":\""+name+"\",\"wfLevel1\":\"1\",\"wfLevel2\":\"2\",\"wfLevel3\":\"3\",\"Description\":\" \",\"EnabledMark\":1,\"wfLevel\":\"2\"}";
|
||||
string frmData ="{\"4fcd4c6f-eb6b-6a6d-eb4e-7948763c5bba\":\"\",\"88061dda-642e-bcdb-909b-cea2bbe5ad69\":\" \"}";
|
||||
_runApp.CreateInstance(Guid.Empty, Guid.Parse("5f0ca3df-390a-4bd7-aecb-5304bf2d191c"), str.ToObject<WFProcessInstance>(), frmData);
|
||||
_runApp.CreateInstance(string.Empty, (string)("5f0ca3df-390a-4bd7-aecb-5304bf2d191c"), str.ToObject<WFProcessInstance>(), frmData);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user