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
Post a Comment