D
dmeglio
Hello,
I've just ported an ASP.NET project from VS 2003 to 2008. In 2003, I
was using NUnit to test. Under 2008, I don't get a single DLL for my
website, so I can't use NUnit anymore. Additionally, I'd prefer to use
the built in VS2008 Pro tools. I don't want to actually test ASPX
functionality, rather I have several classes that are in my App_Code
folder. I can't build a "test project" because there is no DLL for me
to reference so that I can test my App_Code. So, I tried adding the
test cases to a cs file in App_Code directly. First, when I click on a
class and do "Create Unit Tests", it fails with: There was an
unexpected error in displaying the Create Unit Tests Dialog. Please
rebuild and try again.
Naturally, I have tried rebuilding numerous times. Next I tried adding
a reference to Microsoft.VisualStudio.TestTools.UnitTesting and
manually specifying [TestClass] and [TestMethod] it seems that it
still doesn't work. When I try to run the tests, I'm told that there
aren't any.
Does anyone know how I can accomplish this? Again, I'm not looking to
test ASPX functionality, I'm looking to test classes contained in
App_Code, so I don't think that whole UrlToTest() thing is necessary,
or am I wrong?
Thanks in advance.
I've just ported an ASP.NET project from VS 2003 to 2008. In 2003, I
was using NUnit to test. Under 2008, I don't get a single DLL for my
website, so I can't use NUnit anymore. Additionally, I'd prefer to use
the built in VS2008 Pro tools. I don't want to actually test ASPX
functionality, rather I have several classes that are in my App_Code
folder. I can't build a "test project" because there is no DLL for me
to reference so that I can test my App_Code. So, I tried adding the
test cases to a cs file in App_Code directly. First, when I click on a
class and do "Create Unit Tests", it fails with: There was an
unexpected error in displaying the Create Unit Tests Dialog. Please
rebuild and try again.
Naturally, I have tried rebuilding numerous times. Next I tried adding
a reference to Microsoft.VisualStudio.TestTools.UnitTesting and
manually specifying [TestClass] and [TestMethod] it seems that it
still doesn't work. When I try to run the tests, I'm told that there
aren't any.
Does anyone know how I can accomplish this? Again, I'm not looking to
test ASPX functionality, I'm looking to test classes contained in
App_Code, so I don't think that whole UrlToTest() thing is necessary,
or am I wrong?
Thanks in advance.