优化单元测试速度

This commit is contained in:
28810
2019-06-06 12:37:05 +08:00
parent e62890bbfb
commit eb2d258f08
3 changed files with 10 additions and 10 deletions

View File

@@ -270,7 +270,7 @@ namespace FreeSql.Tests {
g.mysql.Aop.ParseExpression = (s, e) => {
if (e.Expression.NodeType == ExpressionType.Call) {
var callExp = e.Expression as MethodCallExpression;
if (callExp.Object.Type == typeof(DateTime) &&
if (callExp.Object?.Type == typeof(DateTime) &&
callExp.Method.Name == "ToString" &&
callExp.Arguments.Count == 1 &&
callExp.Arguments[0].Type == typeof(string) &&