check bugs

This commit is contained in:
yubaolee
2018-03-28 17:35:43 +08:00
parent 0b4dfcd429
commit b01e8aadcc
7 changed files with 100 additions and 38 deletions

View File

@@ -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>

View 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);
}
}
}
}