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

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -