public class portal
{
public portal()
{
}
[DataSource ("Microsoft.VisualStudio.TestTools.DataSource.TestCase", "http://alm:8080/tfs/....", "15729", DataAccessMethod.Sequential), TestMethod]
public static void portalmtm()
{
BrowserWindow b = BrowserWindow.Launch(new System.Uri(TestContext.DataRow["portals"].ToString()));
}
public static TestContext TestContext
{
get
{
return testContextInstance;
}
set
{
testContextInstance = value;
}
}
private static TestContext testContextInstance;
}
}
It gives an error when I use it in codeduitest (testmethod) System.NullReferenceException : Object reference not set to an instance of an object. What is the problem? What can I do?Thanks...
[TestMethod]
public void Test1()
{
portalmtm();
this.UIMap....
this.UIMap....
}
public TestContext TestContext
{
get
{
return testContextInstance;
}
set
{
testContextInstance = value;
}
}
private TestContext testContextInstance;