generated from wenjy/Sln.Iot
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.
80 lines
2.6 KiB
C#
80 lines
2.6 KiB
C#
global using Xunit;
|
|
global using Sln.Iot.Repository.dao;
|
|
using Sln.Iot.Repository;
|
|
using Sln.Iot.Repository.service;
|
|
using System.Collections;
|
|
using Sln.Iot.Business;
|
|
using Sln.Iot.PLC;
|
|
|
|
namespace Sln.Iot.Test
|
|
{
|
|
public class UnitTest1
|
|
{
|
|
[Fact]
|
|
public void Test1()
|
|
{
|
|
//PLCÁ¬½Ó³õʼ»¯
|
|
PLCConnect.Instance.InitConnect();
|
|
UnitsProcessPLCDataGetBusiness unitsProcessPLCDataGetBusiness = UnitsProcessPLCDataGetBusiness.Instance;
|
|
|
|
var data1 = unitsProcessPLCDataGetBusiness.Vacuum1PlcDataGet();
|
|
var data2 = unitsProcessPLCDataGetBusiness.Vacuum2PlcDataGet();
|
|
var data3 = unitsProcessPLCDataGetBusiness.PreHeatOvenPlcDataGet();
|
|
var data4 = unitsProcessPLCDataGetBusiness.PreCureOvenPlcDataGet();
|
|
var data5 = unitsProcessPLCDataGetBusiness.CureOvenPlcDataGet();
|
|
|
|
|
|
}
|
|
|
|
[Fact]
|
|
public void Test2()
|
|
{
|
|
string tid = Guid.NewGuid().ToString();
|
|
List<TrayRfidBinding> testDatas = new List<TrayRfidBinding>()
|
|
{
|
|
new TrayRfidBinding()
|
|
{
|
|
GUID = Guid.NewGuid().ToString(),
|
|
TrayCode = "Tray001",
|
|
ProductionCode = "ProdA",
|
|
TransactionID = tid,
|
|
},
|
|
new TrayRfidBinding()
|
|
{
|
|
GUID = Guid.NewGuid().ToString(),
|
|
TrayCode = "Tray002",
|
|
ProductionCode = "ProdB",
|
|
TransactionID = tid,
|
|
},
|
|
new TrayRfidBinding()
|
|
{
|
|
GUID = Guid.NewGuid().ToString(),
|
|
TrayCode = "Tray002",
|
|
ProductionCode = "ProdC",
|
|
TransactionID = tid,
|
|
},
|
|
new TrayRfidBinding()
|
|
{
|
|
GUID = Guid.NewGuid().ToString(),
|
|
TrayCode = "Tray002",
|
|
ProductionCode = "ProdD",
|
|
TransactionID = tid,
|
|
},
|
|
new TrayRfidBinding()
|
|
{
|
|
GUID = Guid.NewGuid().ToString(),
|
|
TrayCode = "Tray003",
|
|
ProductionCode = "ProdE",
|
|
TransactionID = tid,
|
|
},
|
|
|
|
};
|
|
//var ress = SQLiteHelper<TrayRfidBinding>.Instance.InsertRange(testDatas);
|
|
|
|
//var res = SQLiteHelper<TrayRfidBinding>.Instance.DeleteRange("Tray002");
|
|
//Assert.Equal(5, res);
|
|
|
|
|
|
}
|
|
}
|
|
} |