mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 10:08:19 +08:00
Add unit test
This commit is contained in:
@@ -3,6 +3,7 @@ using SqlSugar;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Management;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
@@ -127,6 +128,16 @@ namespace OrmTest
|
|||||||
{
|
{
|
||||||
it.UnitA002 = db.Queryable<UnitA002>().SetContext(x => x.orgid, () => it.orgid, it).First();
|
it.UnitA002 = db.Queryable<UnitA002>().SetContext(x => x.orgid, () => it.orgid, it).First();
|
||||||
});
|
});
|
||||||
|
var sql=db.Queryable<Unirtewqtq<string>>().ToSqlString();
|
||||||
|
if (sql.Contains("dfafaafs") == false)
|
||||||
|
{
|
||||||
|
throw new Exception("unit error");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[SugarTable("dfafaafs")]
|
||||||
|
public class Unirtewqtq<T>
|
||||||
|
{
|
||||||
|
public T name { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class UnitA001
|
public class UnitA001
|
||||||
|
Reference in New Issue
Block a user