我正在进行编码的 Ui 测试。当我运行我的测试时:
public partial class UIMap
{
public UIMap()
{
this.TestInit();
}
private HandlingUnitDataController huDC = new HandlingUnitDataController();
public DataTransferHandlingUnit testHU = new DataTransferHandlingUnit();
public void pressEnter3()
{
List<DataTransferHandlingUnit> DataList;
DataList = huDC.GetHandlingUnits(null);
foreach (DataTransferHandlingUnit hu in DataList)
{
if (hu.idlabel == this.IdLabelInputParams.UIScannBoxEdit2Text)
{
testHU = hu;
break;
}
}
Assert.AreEqual(testHU.idlabel,this.IdLabelInputParams.UIScannBoxEdit2Text);
}
出现错误:
Assert.AreEqual 失败预期:<(Null)>
我做错了什么?谢谢。