asp.net - How to unit Test on aspx.cs -


i trying unit test on aspx partial class, example button_click event.

i think task more suitable integration testing using "seleniumhq" or "watin".

the other way can think of doing test extract business logic within eventhandler, put different class , perform unit test on that.

what think?

yes, you're moving in right direction. googling on "model-view-presenter" , "passive view".

the idea move logic code-behind file presenter class easily-instantiated , not platform dependent poco. presenter testable then. code-behind code pretty "dummy", name "passive view" suggests.

edit: here example winforms pattern works asp.net , android java well.


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

Error while updating a record in APEX screen -

c++ - In an add-in in Excel, written in C(++), how does one get the name of the function which called into the addin? -