2

I have list of ASP.NET legacy projects. In these projects business logic is tightly bound with the Pages. All the authentication and other stuff is written in load and click events in the code behind. I am using Visual Studio 2012.

What is the best way to unit testing these projects?

1

1 Answer 1

1

When unit testing legacy ASP.NET code, some of the hardest challenges are in mocking out stuff like the Session, HTTP Context and the Page Object. To isolate these you end up having very messy mocking logic, usually involving a lot of reflection and run-time injection of values.

TypeMock is invaluable here as it has everything you need to isolate diificult to mock types like the ones above, and also has a lot of helpers for mocking the the ASP.NET pipeline without having to rely on a web server.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.