105040 调整测试数据集
This commit is contained in:
parent
34e2337864
commit
dcfffe934f
|
@ -2,6 +2,7 @@
|
||||||
using Sinvo.EplanHpD.Plugin.WPFUI.Models;
|
using Sinvo.EplanHpD.Plugin.WPFUI.Models;
|
||||||
using Sinvo.EplanHpD.Plugin.WPFUI.ViewModel;
|
using Sinvo.EplanHpD.Plugin.WPFUI.ViewModel;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace Sinvo.EplanHpD.Plugin.Test
|
namespace Sinvo.EplanHpD.Plugin.Test
|
||||||
{
|
{
|
||||||
|
@ -74,9 +75,87 @@ namespace Sinvo.EplanHpD.Plugin.Test
|
||||||
WireNumber= "L1CP528",
|
WireNumber= "L1CP528",
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[TestMethod("检查所有项时是否有异常")]
|
||||||
|
public void CheckAllErrorTest()
|
||||||
|
{
|
||||||
|
var vm = new MainViewModel();
|
||||||
|
var datas = new List<StuffedDataModel>
|
||||||
|
{
|
||||||
|
new StuffedDataModel
|
||||||
|
{
|
||||||
|
CheckedMsg= null,
|
||||||
|
CrossSection= "1.5",
|
||||||
|
DiscolorationDesc= "V-1.5-CE(褐色)/定制",
|
||||||
|
ErrorCount= 0,
|
||||||
|
FrontStripLength= "5.2 mm",
|
||||||
|
FrontTerminalMaterialCode= "42020100000382",
|
||||||
|
FrontTerminalModel= "C45-1.5-CE/定制",
|
||||||
|
Imprint= "L1CP527",
|
||||||
|
Insulation= new InsulationModel(),
|
||||||
|
IsChecked= false,
|
||||||
|
IsError= false,
|
||||||
|
IsIgnore= false,
|
||||||
|
Model= "RV-BK-1x1.5-1224-16×N2-L1CP528",
|
||||||
|
NumberTubeContent= "白色号码管φ6/定制",
|
||||||
|
NumberTubeMaterialNo= "42020100000249",
|
||||||
|
NumberTubeSpec= "白色号码管φ6/定制",
|
||||||
|
Quantity= 1,
|
||||||
|
RearStripLength= "8 mm",
|
||||||
|
RearTerminalMaterialCode= "42020100000427",
|
||||||
|
RearTerminalModel= "SNB2-4-CE/定制",
|
||||||
|
WireCode= "42020100000188",
|
||||||
|
WireColor= "BK",
|
||||||
|
WireLength= "1224",
|
||||||
|
WireModel= "黑色RV1.5/定制",
|
||||||
|
WireName= "w_00931",
|
||||||
|
WireNumber= "L1CP528",
|
||||||
|
|
||||||
|
},
|
||||||
|
new StuffedDataModel
|
||||||
|
{
|
||||||
|
CheckedMsg= null,
|
||||||
|
CrossSection= "1.5",
|
||||||
|
DiscolorationDesc= "V-6-CE(绿色)/定制",
|
||||||
|
ErrorCount= 0,
|
||||||
|
FrontStripLength= "5.2 mm",
|
||||||
|
FrontTerminalMaterialCode= "42020100000920",
|
||||||
|
FrontTerminalModel= "RNB5.5-6-CE/定制",
|
||||||
|
Imprint= "L1CP528",
|
||||||
|
Insulation= new InsulationModel
|
||||||
|
{
|
||||||
|
Specification = "V-6-CE(绿色)/定制",
|
||||||
|
MaterialCode = "42013500000438",
|
||||||
|
|
||||||
|
},
|
||||||
|
IsChecked= false,
|
||||||
|
IsError= false,
|
||||||
|
IsIgnore= false,
|
||||||
|
Model= "RV-BK-1x1.5-1224-16×N2-L1CP528",
|
||||||
|
NumberTubeContent= "白色号码管φ6/定制",
|
||||||
|
NumberTubeMaterialNo= "42020100000249",
|
||||||
|
NumberTubeSpec= "白色号码管φ6/定制",
|
||||||
|
Quantity= 1,
|
||||||
|
RearStripLength= "8 mm",
|
||||||
|
RearTerminalMaterialCode= "42020100000605",
|
||||||
|
RearTerminalModel= "C45-6-CE/定制",
|
||||||
|
WireCode= "42020100000513",
|
||||||
|
WireColor= "BK",
|
||||||
|
WireLength= "1224",
|
||||||
|
WireModel= "橙色RV6.0-CE/定制",
|
||||||
|
WireName= "w_00931",
|
||||||
|
WireNumber= "L1CP528",
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
vm.CheckAll(datas);
|
||||||
|
Assert.IsTrue(datas.First(it => it.Imprint == "L1CP527").IsError);
|
||||||
|
Assert.IsFalse(datas.First(it => it.Imprint == "L1CP528").IsError);
|
||||||
|
}
|
||||||
|
|
||||||
[TestMethod("检查包括D-PE的线")]
|
[TestMethod("检查包括D-PE的线")]
|
||||||
public void CheckAllWithDPETest()
|
public void CheckAllWithDPETest()
|
||||||
{
|
{
|
||||||
|
@ -96,7 +175,6 @@ namespace Sinvo.EplanHpD.Plugin.Test
|
||||||
Insulation= new InsulationModel()
|
Insulation= new InsulationModel()
|
||||||
{
|
{
|
||||||
Specification = "V-1.5-CE(褐色)/定制",
|
Specification = "V-1.5-CE(褐色)/定制",
|
||||||
|
|
||||||
},
|
},
|
||||||
IsChecked= false,
|
IsChecked= false,
|
||||||
IsError= false,
|
IsError= false,
|
||||||
|
|
|
@ -105,7 +105,6 @@ Project = "放卷2",
|
||||||
[TestMethod("号码管处理测试")]
|
[TestMethod("号码管处理测试")]
|
||||||
public void StuffedNameTubeTest()
|
public void StuffedNameTubeTest()
|
||||||
{
|
{
|
||||||
|
|
||||||
var vm = new MainViewModel();
|
var vm = new MainViewModel();
|
||||||
var result = vm.StuffData(new List<ReportModel>
|
var result = vm.StuffData(new List<ReportModel>
|
||||||
{
|
{
|
||||||
|
@ -125,7 +124,6 @@ Project = "放卷2",
|
||||||
DisplayColor = "黄色",
|
DisplayColor = "黄色",
|
||||||
DisplayStripeColor = "绿色"
|
DisplayStripeColor = "绿色"
|
||||||
}
|
}
|
||||||
|
|
||||||
}).Result;
|
}).Result;
|
||||||
//Assert.IsTrue(result.Count == 4);
|
//Assert.IsTrue(result.Count == 4);
|
||||||
//Assert.IsTrue(result.Where(it => it.Imprint == "EC5L1").First().WireColor == "LBU");
|
//Assert.IsTrue(result.Where(it => it.Imprint == "EC5L1").First().WireColor == "LBU");
|
||||||
|
|
Loading…
Reference in New Issue