Update unit test

This commit is contained in:
sunkaixuna 2021-12-16 12:38:19 +08:00
parent 5f51ed280e
commit b3af96998f
2 changed files with 21 additions and 1 deletions

View File

@ -105,6 +105,17 @@ namespace OrmTest
x2 = o2, x2 = o2,
x3 = o3 x3 = o3
}).ToList(); }).ToList();
Db.CodeFirst.InitTables<UnitEnumadfa>();
Db.Insertable(new UnitEnumadfa()).ExecuteCommand();
Db.Insertable(new UnitEnumadfa() { Type = DbType.Sqlite }).ExecuteCommand();
var listEnum = Db.Queryable<UnitEnumadfa>().ToList();
}
public class UnitEnumadfa
{
[SugarColumn(IsNullable = true)]
public DbType? Type { get; set; }
} }
public static class IEnumerbleContains public static class IEnumerbleContains

View File

@ -195,10 +195,19 @@ namespace OrmTest
.Select(it => it.CreateTime.ToString("yyyy-MM-dd")).ToList(); .Select(it => it.CreateTime.ToString("yyyy-MM-dd")).ToList();
Check.Exception(d11111.Last() != "2021-11-30", "unit error"); Check.Exception(d11111.Last() != "2021-11-30", "unit error");
db.CodeFirst.InitTables<UnitEnumadfa>();
db.Insertable(new UnitEnumadfa()).ExecuteCommand();
db.Insertable(new UnitEnumadfa() { Type=DbType.Sqlite}).ExecuteCommand();
var listEnum=db.Queryable<UnitEnumadfa>().ToList();
} }
public class UnitEnumadfa
{
[SugarColumn(IsNullable =true)]
public DbType? Type { get; set; }
}
public class UnitBytes11 public class UnitBytes11
{ {
[SugarColumn(Length =200,IsNullable =true)] [SugarColumn(Length =200,IsNullable =true)]