Update unit tests

This commit is contained in:
sunkaixuna 2021-10-31 17:50:21 +08:00
parent c6456076cd
commit a996e8f483
7 changed files with 26 additions and 26 deletions

View File

@ -25,13 +25,13 @@ namespace OrmTest
} }
} }
}); });
public static SqlSugarClient ssDb => new SqlSugarClient(new ConnectionConfig() public static SqlSugarScope ssDb => new SqlSugarScope(new ConnectionConfig()
{ {
DbType = DbType.Dm, DbType = DbType.Dm,
ConnectionString = Config.ConnectionString, ConnectionString = Config.ConnectionString,
InitKeyType = InitKeyType.Attribute, InitKeyType = InitKeyType.Attribute,
IsAutoCloseConnection = true, IsAutoCloseConnection = true,
IsShardSameThread = true, //IsShardSameThread = true,
AopEvents = new AopEvents AopEvents = new AopEvents
{ {
OnLogExecuting = (sql, p) => OnLogExecuting = (sql, p) =>
@ -56,13 +56,13 @@ namespace OrmTest
} }
} }
}); });
public static SqlSugarClient singleAndSsDb = new SqlSugarClient(new ConnectionConfig() public static SqlSugarScope singleAndSsDb = new SqlSugarScope(new ConnectionConfig()
{ {
DbType = DbType.Dm, DbType = DbType.Dm,
ConnectionString = Config.ConnectionString, ConnectionString = Config.ConnectionString,
InitKeyType = InitKeyType.Attribute, InitKeyType = InitKeyType.Attribute,
IsAutoCloseConnection = true, IsAutoCloseConnection = true,
IsShardSameThread = true, //IsShardSameThread = true,
AopEvents = new AopEvents AopEvents = new AopEvents
{ {
OnLogExecuting = (sql, p) => OnLogExecuting = (sql, p) =>

View File

@ -25,13 +25,13 @@ namespace OrmTest
} }
} }
}); });
public static SqlSugarClient ssDb => new SqlSugarClient(new ConnectionConfig() public static SqlSugarScope ssDb => new SqlSugarScope(new ConnectionConfig()
{ {
DbType = DbType.Kdbndp, DbType = DbType.Kdbndp,
ConnectionString = Config.ConnectionString, ConnectionString = Config.ConnectionString,
InitKeyType = InitKeyType.Attribute, InitKeyType = InitKeyType.Attribute,
IsAutoCloseConnection = true, IsAutoCloseConnection = true,
IsShardSameThread = true, // IsShardSameThread = true,
AopEvents = new AopEvents AopEvents = new AopEvents
{ {
OnLogExecuting = (sql, p) => OnLogExecuting = (sql, p) =>
@ -56,13 +56,13 @@ namespace OrmTest
} }
} }
}); });
public static SqlSugarClient singleAndSsDb = new SqlSugarClient(new ConnectionConfig() public static SqlSugarScope singleAndSsDb = new SqlSugarScope(new ConnectionConfig()
{ {
DbType = DbType.Kdbndp, DbType = DbType.Kdbndp,
ConnectionString = Config.ConnectionString, ConnectionString = Config.ConnectionString,
InitKeyType = InitKeyType.Attribute, InitKeyType = InitKeyType.Attribute,
IsAutoCloseConnection = true, IsAutoCloseConnection = true,
IsShardSameThread = true, //IsShardSameThread = true,
AopEvents = new AopEvents AopEvents = new AopEvents
{ {
OnLogExecuting = (sql, p) => OnLogExecuting = (sql, p) =>

View File

@ -25,13 +25,13 @@ namespace OrmTest
} }
} }
}); });
public static SqlSugarClient ssDb => new SqlSugarClient(new ConnectionConfig() public static SqlSugarScope ssDb => new SqlSugarScope(new ConnectionConfig()
{ {
DbType = DbType.MySql, DbType = DbType.MySql,
ConnectionString = Config.ConnectionString, ConnectionString = Config.ConnectionString,
InitKeyType = InitKeyType.Attribute, InitKeyType = InitKeyType.Attribute,
IsAutoCloseConnection = true, IsAutoCloseConnection = true,
IsShardSameThread = true, //IsShardSameThread = true,
AopEvents = new AopEvents AopEvents = new AopEvents
{ {
OnLogExecuting = (sql, p) => OnLogExecuting = (sql, p) =>
@ -56,13 +56,13 @@ namespace OrmTest
} }
} }
}); });
public static SqlSugarClient singleAndSsDb = new SqlSugarClient(new ConnectionConfig() public static SqlSugarScope singleAndSsDb = new SqlSugarScope(new ConnectionConfig()
{ {
DbType = DbType.MySql, DbType = DbType.MySql,
ConnectionString = Config.ConnectionString, ConnectionString = Config.ConnectionString,
InitKeyType = InitKeyType.Attribute, InitKeyType = InitKeyType.Attribute,
IsAutoCloseConnection = true, IsAutoCloseConnection = true,
IsShardSameThread = true, //IsShardSameThread = true,
AopEvents = new AopEvents AopEvents = new AopEvents
{ {
OnLogExecuting = (sql, p) => OnLogExecuting = (sql, p) =>

View File

@ -25,13 +25,13 @@ namespace OrmTest
} }
} }
}); });
public static SqlSugarClient ssDb => new SqlSugarClient(new ConnectionConfig() public static SqlSugarScope ssDb => new SqlSugarScope(new ConnectionConfig()
{ {
DbType = DbType.Oracle, DbType = DbType.Oracle,
ConnectionString = Config.ConnectionString, ConnectionString = Config.ConnectionString,
InitKeyType = InitKeyType.Attribute, InitKeyType = InitKeyType.Attribute,
IsAutoCloseConnection = true, IsAutoCloseConnection = true,
IsShardSameThread = true, //IsShardSameThread = true,
AopEvents = new AopEvents AopEvents = new AopEvents
{ {
OnLogExecuting = (sql, p) => OnLogExecuting = (sql, p) =>
@ -56,13 +56,13 @@ namespace OrmTest
} }
} }
}); });
public static SqlSugarClient singleAndSsDb = new SqlSugarClient(new ConnectionConfig() public static SqlSugarScope singleAndSsDb = new SqlSugarScope(new ConnectionConfig()
{ {
DbType = DbType.Oracle, DbType = DbType.Oracle,
ConnectionString = Config.ConnectionString, ConnectionString = Config.ConnectionString,
InitKeyType = InitKeyType.Attribute, InitKeyType = InitKeyType.Attribute,
IsAutoCloseConnection = true, IsAutoCloseConnection = true,
IsShardSameThread = true, //IsShardSameThread = true,
AopEvents = new AopEvents AopEvents = new AopEvents
{ {
OnLogExecuting = (sql, p) => OnLogExecuting = (sql, p) =>

View File

@ -25,13 +25,13 @@ namespace OrmTest
} }
} }
}); });
public static SqlSugarClient ssDb => new SqlSugarClient(new ConnectionConfig() public static SqlSugarScope ssDb => new SqlSugarScope(new ConnectionConfig()
{ {
DbType = DbType.PostgreSQL, DbType = DbType.PostgreSQL,
ConnectionString = Config.ConnectionString, ConnectionString = Config.ConnectionString,
InitKeyType = InitKeyType.Attribute, InitKeyType = InitKeyType.Attribute,
IsAutoCloseConnection = true, IsAutoCloseConnection = true,
IsShardSameThread = true, //IsShardSameThread = true,
AopEvents = new AopEvents AopEvents = new AopEvents
{ {
OnLogExecuting = (sql, p) => OnLogExecuting = (sql, p) =>
@ -56,13 +56,13 @@ namespace OrmTest
} }
} }
}); });
public static SqlSugarClient singleAndSsDb = new SqlSugarClient(new ConnectionConfig() public static SqlSugarScope singleAndSsDb = new SqlSugarScope(new ConnectionConfig()
{ {
DbType = DbType.PostgreSQL, DbType = DbType.PostgreSQL,
ConnectionString = Config.ConnectionString, ConnectionString = Config.ConnectionString,
InitKeyType = InitKeyType.Attribute, InitKeyType = InitKeyType.Attribute,
IsAutoCloseConnection = true, IsAutoCloseConnection = true,
IsShardSameThread = true, //IsShardSameThread = true,
AopEvents = new AopEvents AopEvents = new AopEvents
{ {
OnLogExecuting = (sql, p) => OnLogExecuting = (sql, p) =>

View File

@ -56,13 +56,13 @@ namespace OrmTest
} }
} }
}); });
public static SqlSugarClient singleAndSsDb = new SqlSugarClient(new ConnectionConfig() public static SqlSugarScope singleAndSsDb = new SqlSugarScope(new ConnectionConfig()
{ {
DbType = DbType.SqlServer, DbType = DbType.SqlServer,
ConnectionString = Config.ConnectionString, ConnectionString = Config.ConnectionString,
InitKeyType = InitKeyType.Attribute, InitKeyType = InitKeyType.Attribute,
IsAutoCloseConnection = true, IsAutoCloseConnection = true,
IsShardSameThread = true, //IsShardSameThread = true,
AopEvents = new AopEvents AopEvents = new AopEvents
{ {
OnLogExecuting = (sql, p) => OnLogExecuting = (sql, p) =>

View File

@ -25,13 +25,13 @@ namespace OrmTest
} }
} }
}); });
public static SqlSugarClient ssDb => new SqlSugarClient(new ConnectionConfig() public static SqlSugarScope ssDb => new SqlSugarScope(new ConnectionConfig()
{ {
DbType = DbType.Sqlite, DbType = DbType.Sqlite,
ConnectionString = Config.ConnectionString, ConnectionString = Config.ConnectionString,
InitKeyType = InitKeyType.Attribute, InitKeyType = InitKeyType.Attribute,
IsAutoCloseConnection = true, IsAutoCloseConnection = true,
IsShardSameThread = true, //IsShardSameThread = true,
AopEvents = new AopEvents AopEvents = new AopEvents
{ {
OnLogExecuting = (sql, p) => OnLogExecuting = (sql, p) =>
@ -56,13 +56,13 @@ namespace OrmTest
} }
} }
}); });
public static SqlSugarClient singleAndSsDb = new SqlSugarClient(new ConnectionConfig() public static SqlSugarScope singleAndSsDb = new SqlSugarScope(new ConnectionConfig()
{ {
DbType = DbType.Sqlite, DbType = DbType.Sqlite,
ConnectionString = Config.ConnectionString, ConnectionString = Config.ConnectionString,
InitKeyType = InitKeyType.Attribute, InitKeyType = InitKeyType.Attribute,
IsAutoCloseConnection = true, IsAutoCloseConnection = true,
IsShardSameThread = true, //IsShardSameThread = true,
AopEvents = new AopEvents AopEvents = new AopEvents
{ {
OnLogExecuting = (sql, p) => OnLogExecuting = (sql, p) =>