Trying to get Nunit working in ASP.Net.
The problem is, I'm testing a custom control - which references a Global Resource.
When I try to unit test it
/// </summary>
[Test]
public void TestSetAndGetNumber()
{
PhoneNumber phone = new PhoneNumber(PhoneNumber.NumberType.Business, "", true, "");
string expectedString = "1-800-Goat-Phone";
string resultString = "1-800-Goat-Phone";
resultString = phone.Value = resultString;
Assert.AreEqual(expectedString, resultString, "GetNumberMatch method returned unexpected result.");
Assert.Fail("Create or modify test(s).");
}
I will get "cannot load App_GlobalResources".
Trying to figure out if maybe I should attempt to simulate HttpContext Using You've been Haacked blog post but nobody has verified this is do-able.