mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-18 17:48:01 +08:00
check bugs
This commit is contained in:
@@ -124,6 +124,7 @@
|
||||
<Compile Include="TestLogin.cs" />
|
||||
<Compile Include="TestAuthen.cs" />
|
||||
<Compile Include="TestOrg.cs" />
|
||||
<Compile Include="TestForm.cs" />
|
||||
<Compile Include="TestUser.cs" />
|
||||
<Compile Include="TestWorkflow.cs" />
|
||||
</ItemGroup>
|
||||
|
36
OpenAuth.UnitTest/TestForm.cs
Normal file
36
OpenAuth.UnitTest/TestForm.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using Infrastructure;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using OpenAuth.App;
|
||||
using OpenAuth.Repository.Domain;
|
||||
|
||||
namespace OpenAuth.UnitTest
|
||||
{
|
||||
[TestClass]
|
||||
public class TestForm : TestBase
|
||||
{
|
||||
private FormApp _app;
|
||||
|
||||
public TestForm()
|
||||
{
|
||||
_app = AutofacExt.GetFromFac<FormApp>();
|
||||
}
|
||||
|
||||
|
||||
[TestMethod]
|
||||
public void Update()
|
||||
{
|
||||
try
|
||||
{
|
||||
var form = _app.FindSingle("048b8074-1a68-4dc4-af15-dbc0914f5745");
|
||||
var newform = form.MapTo<Form>();
|
||||
_app.Update(newform);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user