临时提交2
This commit is contained in:
@@ -10,23 +10,23 @@ namespace DMS.Infrastructure.UnitTests
|
||||
{
|
||||
public static class FakerHelper
|
||||
{
|
||||
// public static DbDevice FakeDbDevice()
|
||||
// {
|
||||
// // var dbDevice = new Faker<DbDevice>()
|
||||
// // .RuleFor(d => d.Name, f => f.Commerce.ProductName())
|
||||
// // .RuleFor(d => d.Description, f => f.Commerce.ProductDescription())
|
||||
// // .RuleFor(d => d.Ip, f => f.Internet.Ip())
|
||||
// // .Generate();
|
||||
// // dbDevice.Prot = 102;
|
||||
// // dbDevice.ProtocolType = Core.Enums.ProtocolType.S7;
|
||||
// // dbDevice.Slot = 1;
|
||||
// // dbDevice.Rack = 0;
|
||||
// // dbDevice.CpuType = S7.Net.CpuType.S71200;
|
||||
// // dbDevice.DeviceType = Core.Enums.DeviceType.SiemensPLC;
|
||||
//
|
||||
//
|
||||
// return dbDevice;
|
||||
// }
|
||||
public static DbDevice FakeDbDevice()
|
||||
{
|
||||
var dbDevice = new Faker<DbDevice>()
|
||||
.RuleFor(d => d.Name, f => f.Commerce.ProductName())
|
||||
.RuleFor(d => d.Description, f => f.Commerce.ProductDescription())
|
||||
.RuleFor(d => d.IpAddress, f => f.Internet.Ip())
|
||||
.RuleFor(d => d.OpcUaServerUrl, f => f.Internet.Url())
|
||||
.Generate();
|
||||
dbDevice.Port = 102;
|
||||
dbDevice.Protocol = ProtocolType.S7;
|
||||
dbDevice.Slot = 1;
|
||||
dbDevice.Rack = 0;
|
||||
dbDevice.CpuType = "S7-1200";
|
||||
dbDevice.DeviceType = Core.Enums.DeviceType.SiemensPLC;
|
||||
|
||||
return dbDevice;
|
||||
}
|
||||
|
||||
// public static DbVariableTable FakeDbVariableTable()
|
||||
// {
|
||||
|
||||
Reference in New Issue
Block a user