mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Add unit test
This commit is contained in:
parent
b748017295
commit
82706ad443
@ -106,6 +106,22 @@ namespace OrmTest
|
|||||||
{
|
{
|
||||||
throw new Exception("unit error");
|
throw new Exception("unit error");
|
||||||
}
|
}
|
||||||
|
var p = new Order() { };
|
||||||
|
var sqlobj=db.Updateable<Order>().SetColumns(x => x.Name == p.Name)
|
||||||
|
.Where(x => x.Id == 1).ToSql();
|
||||||
|
|
||||||
|
if (!sqlobj.Key.Contains("="))
|
||||||
|
{
|
||||||
|
throw new Exception("unit error");
|
||||||
|
}
|
||||||
|
|
||||||
|
var sqlobj2 = db.Updateable<Order>().SetColumns(x => x.Name == null)
|
||||||
|
.Where(x => x.Id == 1).ToSql();
|
||||||
|
|
||||||
|
if (!sqlobj2.Key.Contains("="))
|
||||||
|
{
|
||||||
|
throw new Exception("unit error");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TestDTO
|
public class TestDTO
|
||||||
|
Loading…
Reference in New Issue
Block a user