mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-04-05 17:38:01 +08:00
36 lines
915 B
C#
36 lines
915 B
C#
using System;
|
|
using System.Text;
|
|
using System.Collections.Generic;
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
using OpenAuth.App;
|
|
using OpenAuth.Domain;
|
|
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(),
|
|
new BaseRepository<ModuleElement>(),
|
|
new ResourceRepository()
|
|
);
|
|
var user = login.Login("admin", "admin");
|
|
foreach (var module in user.Modules)
|
|
{
|
|
Console.WriteLine(module.Id +"\t" + module.Name);
|
|
}
|
|
}
|
|
}
|
|
}
|