mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-21 02:58:05 +08:00
Add unit test
This commit is contained in:
@@ -31,6 +31,7 @@ namespace OrmTest
|
|||||||
}
|
}
|
||||||
public static void Init()
|
public static void Init()
|
||||||
{
|
{
|
||||||
|
UnitUpdateOneToMany.Init();
|
||||||
UQueryableByObject.Init();
|
UQueryableByObject.Init();
|
||||||
Unit23131.Init();
|
Unit23131.Init();
|
||||||
SplitTest2();
|
SplitTest2();
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
|
||||||
namespace OrmTest
|
namespace OrmTest
|
||||||
@@ -55,6 +55,10 @@ namespace OrmTest
|
|||||||
var list3=db.Queryable<Country>().Includes(x => x.Provinces).ToList();
|
var list3=db.Queryable<Country>().Includes(x => x.Provinces).ToList();
|
||||||
db.QueryFilter.Clear<Province>();
|
db.QueryFilter.Clear<Province>();
|
||||||
var list4 = db.Queryable<Country>().Includes(x => x.Provinces).ToList();
|
var list4 = db.Queryable<Country>().Includes(x => x.Provinces).ToList();
|
||||||
|
if (list3.First().Provinces.Count != 1 || list4.First().Provinces.Count != 2)
|
||||||
|
{
|
||||||
|
throw new Exception("unit error");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user