mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-11-08 02:14:44 +08:00
完成登录处理
This commit is contained in:
@@ -66,6 +66,7 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="TestFunction.cs" />
|
||||
<Compile Include="TestLogin.cs" />
|
||||
<Compile Include="TestModuleApp.cs" />
|
||||
<Compile Include="TestRepository.cs" />
|
||||
<Compile Include="TestRoleApp.cs" />
|
||||
|
||||
29
OpenAuth.UnitTest/TestLogin.cs
Normal file
29
OpenAuth.UnitTest/TestLogin.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using OpenAuth.App;
|
||||
using OpenAuth.Repository;
|
||||
|
||||
namespace OpenAuth.UnitTest
|
||||
{
|
||||
/// <summary>
|
||||
/// TestLogin 的摘要说明
|
||||
/// </summary>
|
||||
[TestClass]
|
||||
public class TestLogin
|
||||
{
|
||||
|
||||
|
||||
[TestMethod]
|
||||
public void Test()
|
||||
{
|
||||
var login = new LoginApp(new UserRepository(), new ModuleRepository(), new RelevanceRepository());
|
||||
var user = login.Login("admin", "admin");
|
||||
foreach (var module in user.Modules)
|
||||
{
|
||||
Console.WriteLine(module.Id +"\t" + module.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user