F
Frits Ramon
So I'm starting a new ASP.NET project and want to proceed with a test-driven
approach as much as possible. I have decided that I will ceratainly NOT use
the ASP.NET MVC framework, and instead go with the traditional web forms
approach.
The first issue I ran into is that, in order to create my unit tests, I'd
need mocks for Application, Session, Context etc. Thinking that through,
these mocks would have to do practically *everything* offered by the
Application, Session etc objects. Suddenly I'm *duplicating* much of what
ASP.NET is - all for the sake of unit testing my code. That seems like a
ridiculous amount of work to get automated unit tests.
Am I missing something? Or is it simply not possible to use TDD for ASP.NET
Web forms application development?
Do any of you use TDD with traditional Web Forms-based ASP.NET Web
applications? If so, how do you get around having your unit tests depend on
Application, Session, etc? Or do you take less of a TDD purist approach and
let your unit tests have those external dependencies?
Thanks.
approach as much as possible. I have decided that I will ceratainly NOT use
the ASP.NET MVC framework, and instead go with the traditional web forms
approach.
The first issue I ran into is that, in order to create my unit tests, I'd
need mocks for Application, Session, Context etc. Thinking that through,
these mocks would have to do practically *everything* offered by the
Application, Session etc objects. Suddenly I'm *duplicating* much of what
ASP.NET is - all for the sake of unit testing my code. That seems like a
ridiculous amount of work to get automated unit tests.
Am I missing something? Or is it simply not possible to use TDD for ASP.NET
Web forms application development?
Do any of you use TDD with traditional Web Forms-based ASP.NET Web
applications? If so, how do you get around having your unit tests depend on
Application, Session, etc? Or do you take less of a TDD purist approach and
let your unit tests have those external dependencies?
Thanks.