修改BUG:ExceptionLog单元测试导致数据库中有空字段生成导致列表页面无法显示全部内容
This commit is contained in:
parent
f9cfa035b4
commit
bee2917e9f
|
@ -10,11 +10,18 @@ namespace Bootstrap.DataAccess.Tests
|
||||||
[TestMethod()]
|
[TestMethod()]
|
||||||
public void LogTest()
|
public void LogTest()
|
||||||
{
|
{
|
||||||
var ex = new Exception("Just for Test");
|
try
|
||||||
var nv = new NameValueCollection();
|
{
|
||||||
nv.Add("ErrorPage", "UnitTest_Page");
|
throw new Exception("Just for Test", new Exception("Inner Exception"));
|
||||||
nv.Add("UserIp", "::1");
|
}
|
||||||
ExceptionHelper.Log(ex, nv);
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
var nv = new NameValueCollection();
|
||||||
|
nv.Add("ErrorPage", "UnitTest_Page");
|
||||||
|
nv.Add("UserIp", "::1");
|
||||||
|
nv.Add("UserId", "UnitTest");
|
||||||
|
ExceptionHelper.Log(ex, nv);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue