单元测试的简单实用

对方法进行测试

[TestMethod()]
public void Tests()
{
var result=_user.Get(id);
Assert.AreEqual(result,id);
}

数据可以从数据库、XML等中获取

原文地址:https://www.cnblogs.com/lostsea/p/7239310.html