考慮到以下代碼是「保存」測試用例 - 我將如何編寫「刪除」測試用例?如何編寫測試用例以執行刪除操作
[Test]
public void Testsavesassignment()
{
var sAssignment = new SAssignment()
{
DateCreated = DateTime.Now,
DateUpdated = DateTime.Now,
Department = 9000.ToString(),
EmployeeId = 4342342
};
Status status = null;
var assignment = this.m_personnelService.SaveSAssignment(sAssignment, out status);
Assert.IsTrue(status.Success);
Assert.AreEqual(sAssignment.EmployeeId, assignment.EmployeeId);
Assert.AreEqual(sAssignment.EmployeeId, assignment.DateCreated);
Assert.AreEqual(sAssignment.DateUpdated, assignment.DateUpdated);
Assert.AreEqual(sAssignment.Department, assignment.Department);
Assert.AreNotEqual(sAssignment.Id, assignment.Id);
}
一些詳細信息將是不錯的,在這一點上,我們都在猜測你的意思,寫一個刪除測試用例? – Andrew
是的安德魯。刪除測試用例。 – nitinrakeysh
請分享一下Delete方法的代碼 – sll