I'm developing an ASP.NET 2.0 app using Visual Studio 2008.
If I want to run a really quick test on a method that's way in my back-end, is there a way for me to just call a main function in that class via command line?
Thanks
I'm developing an ASP.NET 2.0 app using Visual Studio 2008.
If I want to run a really quick test on a method that's way in my back-end, is there a way for me to just call a main function in that class via command line?
Thanks
Short answer: NUnit. You may not know how to use it, but you should. It's not hard to use and learn. It's fast and has a GUI.
Simply create a test project and test it from there. If not you can create a console application and test it from there by referencing the proper project(considering your code to test is in an assembly), which in a way will be your test project.
The answer is no, You cannot do that. You can only have one main function per assembly.
The fact is, you shouldn't do testing like that. C# is not Java, regardless of its origin in Java.
Use NUnit or MSUnit and build unit tests instead. They'll test your methods for you without needing deployment to a website or anything like that. That's the best way to test a method. Here are some links: