与vs官网对visualstudio2017进行了下载
VS官网下载地址
随后进行安装
打开vs
创建C#类库
将测试用例输入
测试用例:
namespace DemoUser
{
public class User
{
public User(string userEmail)
{
m_email = userEmail;
}
private string m_email; //user email as user id
}
}
单元测试代码
[TestMethod()]
public void ConstructorTest()
{
string userEmail = "someone@somewhere.com";
User target = new User(userEmail);
Assert.IsTrue(target != null);
}
测试通过