mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-25 10:08:11 +08:00
Add unit test
This commit is contained in:
parent
0b54710c69
commit
f5bf8b7888
@ -47,6 +47,63 @@ namespace OrmTest
|
|||||||
},
|
},
|
||||||
isAutoFill: true)
|
isAutoFill: true)
|
||||||
.ToListAsync().GetAwaiter().GetResult();
|
.ToListAsync().GetAwaiter().GetResult();
|
||||||
|
|
||||||
|
Check(items);
|
||||||
|
|
||||||
|
var items2 = _db.Queryable<JqdsrdbEntity>()
|
||||||
|
.Includes(dsr => dsr.Jqdsrgxbs)
|
||||||
|
.LeftJoin<JqdsrdbEntity>((x,y)=>x.Jqdsrdbh==y.Jqdsrdbh)
|
||||||
|
.Select((x,y) =>
|
||||||
|
new Resp
|
||||||
|
{
|
||||||
|
Sf = x.Jqdsrgxbs.Select(sf => sf.Sfmc),
|
||||||
|
IsShowOperationButton = true
|
||||||
|
},
|
||||||
|
isAutoFill: true)
|
||||||
|
.ToListAsync().GetAwaiter().GetResult();
|
||||||
|
|
||||||
|
Check(items2);
|
||||||
|
|
||||||
|
var items3 = _db.Queryable<JqdsrdbEntity>()
|
||||||
|
.Includes(dsr => dsr.Jqdsrgxbs)
|
||||||
|
.LeftJoin<JqdsrdbEntity>((x, y) => x.Jqdsrdbh == y.Jqdsrdbh)
|
||||||
|
.Select((x, y) =>
|
||||||
|
new Resp
|
||||||
|
{
|
||||||
|
Sf = x.Jqdsrgxbs.Select(sf => sf.Sfmc)
|
||||||
|
},
|
||||||
|
isAutoFill: true)
|
||||||
|
.ToListAsync().GetAwaiter().GetResult();
|
||||||
|
|
||||||
|
if (items3.First().IsShowOperationButton == false)
|
||||||
|
{
|
||||||
|
items3.First().IsShowOperationButton = true;
|
||||||
|
}
|
||||||
|
Check(items3);
|
||||||
|
|
||||||
|
var items4= _db.Queryable<JqdsrdbEntity>()
|
||||||
|
.Includes(dsr => dsr.Jqdsrgxbs)
|
||||||
|
.LeftJoin<JqdsrdbEntity>((x, y) => x.Jqdsrdbh == y.Jqdsrdbh)
|
||||||
|
.Select((x, y) =>
|
||||||
|
new Resp
|
||||||
|
{
|
||||||
|
Sf = x.Jqdsrgxbs.Select(sf => sf.Sfmc)
|
||||||
|
},
|
||||||
|
isAutoFill: true)
|
||||||
|
.MergeTable()
|
||||||
|
.ToListAsync().GetAwaiter().GetResult();
|
||||||
|
if (items4.First().IsShowOperationButton == false)
|
||||||
|
{
|
||||||
|
items4.First().IsShowOperationButton = true;
|
||||||
|
}
|
||||||
|
Check(items4);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void Check(List<Resp> items)
|
||||||
|
{
|
||||||
if (items.First().Jqdsrdbh != "a" || items.First().IsShowOperationButton == false ||
|
if (items.First().Jqdsrdbh != "a" || items.First().IsShowOperationButton == false ||
|
||||||
items.First().Sf.Count() == 0)
|
items.First().Sf.Count() == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user