Browse Source

Update unit test

pull/14/MERGE
sunkaixuan 3 years ago
parent
commit
8fc13657d8
  1. 1
      Src/Asp.Net/OracleTest/OracleTest.csproj
  2. 2
      Src/Asp.Net/OracleTest/UnitTest/Main.cs
  3. 35
      Src/Asp.Net/OracleTest/UnitTest/UCustom01.cs

1
Src/Asp.Net/OracleTest/OracleTest.csproj

@ -83,6 +83,7 @@
<Compile Include="UnitTest\Main.cs" />
<Compile Include="UnitTest\UAdo.cs" />
<Compile Include="UnitTest\UCodeFirst.cs" />
<Compile Include="UnitTest\UCustom01.cs" />
<Compile Include="UnitTest\UCustom011.cs" />
<Compile Include="UnitTest\UDelete.cs" />
<Compile Include="UnitTest\UJson.cs" />

2
Src/Asp.Net/OracleTest/UnitTest/Main.cs

@ -34,6 +34,8 @@ namespace OrmTest
}
public static void Init()
{
UCustom01.Init();
DeleteTest();
CodeFirst();
Updateable();

35
Src/Asp.Net/OracleTest/UnitTest/UCustom01.cs

@ -0,0 +1,35 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OrmTest
{
public class UCustom01
{
public static void Init()
{
var db = NewUnitTest.Db;
var x = "aaaaaaaaadssadsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssaaa" +
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
db.CodeFirst.InitTables<UnitClob>();
db.Insertable(new List<UnitClob>() {
new UnitClob(){ Clob="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},
new UnitClob(){
Clob=x+x+x+x+x+x+x+x}
}).ExecuteCommand();
}
public class UnitClob
{
[SugarColumn(IsPrimaryKey =true)]
public Guid Id { get; set; }
[SugarColumn(ColumnDataType ="clob", IsNullable =true)]
public string Clob { get; set; }
}
}
}
Loading…
Cancel
Save