You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
global using Xunit;
|
|
|
|
|
global using Sln.Iot.Repository.dao;
|
|
|
|
|
using Sln.Iot.Repository;
|
|
|
|
|
|
|
|
|
|
namespace Sln.Iot.Test
|
|
|
|
|
{
|
|
|
|
|
public class UnitTest1
|
|
|
|
|
{
|
|
|
|
|
[Fact]
|
|
|
|
|
public void Test1()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Fact]
|
|
|
|
|
public void Test2()
|
|
|
|
|
{
|
|
|
|
|
List<TrayRfidBinding> testDatas = new List<TrayRfidBinding>()
|
|
|
|
|
{
|
|
|
|
|
new TrayRfidBinding()
|
|
|
|
|
{
|
|
|
|
|
GUID = Guid.NewGuid().ToString(),
|
|
|
|
|
TrayCode = "Tray001",
|
|
|
|
|
ProductionCode = "ProdA",
|
|
|
|
|
},
|
|
|
|
|
new TrayRfidBinding()
|
|
|
|
|
{
|
|
|
|
|
GUID = Guid.NewGuid().ToString(),
|
|
|
|
|
TrayCode = "Tray002",
|
|
|
|
|
ProductionCode = "ProdB",
|
|
|
|
|
},
|
|
|
|
|
new TrayRfidBinding()
|
|
|
|
|
{
|
|
|
|
|
GUID = Guid.NewGuid().ToString(),
|
|
|
|
|
TrayCode = "Tray002",
|
|
|
|
|
ProductionCode = "ProdC",
|
|
|
|
|
},
|
|
|
|
|
new TrayRfidBinding()
|
|
|
|
|
{
|
|
|
|
|
GUID = Guid.NewGuid().ToString(),
|
|
|
|
|
TrayCode = "Tray002",
|
|
|
|
|
ProductionCode = "ProdD",
|
|
|
|
|
},
|
|
|
|
|
new TrayRfidBinding()
|
|
|
|
|
{
|
|
|
|
|
GUID = Guid.NewGuid().ToString(),
|
|
|
|
|
TrayCode = "Tray003",
|
|
|
|
|
ProductionCode = "ProdE",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
var ress = SQLiteHelper<TrayRfidBinding>.Instance.InsertRange(testDatas);
|
|
|
|
|
|
|
|
|
|
var res = SQLiteHelper<TrayRfidBinding>.Instance.DeleteRange("Tray001");
|
|
|
|
|
Assert.Equal(5, res.Count);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|