Hi,
I was wondering if this works while using the in visual studio 2005 integrated testing tools?
My code:
using System;
using System.Text;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Ivonna.Framework;
using Ivonna.Core;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace IvonnaTestProject
{
/// <summary>
/// Summary description for UnitTest1
/// </summary>
[TestClass, RunOnWebAttribute(@"C:\TEMP\MyTemp\IvonnaTestingWebSite\PrecompiledWeb\IvonnaTestingWebSite", "/")]
public class UnitTest1 : WebFixture
{
public UnitTest1()
{}
[TestMethod]
public void IvonnaMethod()
{
TestSession session = InitSession();
Page testPage = session.GetPage("Default.aspx");
TextBox tb = (TextBox)testPage.FindControl("NameTextBox");
tb.Text = "John";
testPage = session.ProcessPostback("HelloButton");
Label l = (Label)testPage.FindControl("HelloLabel");
Assert.AreEqual<String>("Hello John", l.Text, "Clicking the button did not produce the expected value.");
EndSession();
}
}
}
My error:
Method IvonnaTestProject.UnitTest1.IvonnaMethod does not exist.
Is there any extra setup necessary? Or is it just not possible?