【发布时间】:2011-03-05 04:18:28
【问题描述】:
相当简单的测试:
[TestClass]
public class MyTestClass
{
private TestContext _testContext;
protected TestContext TestContext
{
get { return _testContext; }
set { _testContext = value; }
}
[TestMethod]
[HostType("ASP.NET")]
[UrlToTest("http://localhost/MyPage.aspx")]
public void TestMyPage()
{
Assert.IsNotNull(TestContext);
}
}
失败...现在我正在使用 VS2008 开发版。有没有可能解决这个问题?或者我需要一个测试(或团队套件)版本?
谢谢。
附:需要访问 TestContext 对象才能访问它的 RequestedPage 属性
【问题讨论】:
标签: .net asp.net unit-testing testing visual-studio