mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-20 18:47:55 +08:00
转移.net core 3.1,为.NET 5做准备
This commit is contained in:
41
OpenAuth.App/Test/TestDbExtension.cs
Normal file
41
OpenAuth.App/Test/TestDbExtension.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using Infrastructure;
|
||||
using log4net;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace OpenAuth.App.Test
|
||||
{
|
||||
class TestDbExtension :TestBase
|
||||
{
|
||||
private ILog log = LogManager.GetLogger(typeof(TestDbExtension));
|
||||
|
||||
[Test]
|
||||
public void TestGetProperties()
|
||||
{
|
||||
|
||||
var app = _autofacServiceProvider.GetService<DbExtension>();
|
||||
|
||||
var result = app.GetProperties("Category");
|
||||
Console.WriteLine(JsonHelper.Instance.Serialize(result));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetDbEntityNames()
|
||||
{
|
||||
var app = _autofacServiceProvider.GetService<DbExtension>();
|
||||
|
||||
var result = app.GetDbEntityNames();
|
||||
Console.WriteLine(JsonHelper.Instance.Serialize(result));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestGetTables()
|
||||
{
|
||||
var app = _autofacServiceProvider.GetService<DbExtension>();
|
||||
|
||||
var result = app.GetDbTableStructure("application");
|
||||
Console.WriteLine(JsonHelper.Instance.Serialize(result));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user