Hello,
How to write unit test method for c# windows based application in .Net VS 2008 for example button_click method?
Thanks
Barbi
Unit Testing
Page 1 of 12 Replies - 871 Views - Last Post: 24 May 2010 - 01:10 AM
Replies To: Unit Testing
#2
Re: Unit Testing
Posted 23 May 2010 - 11:57 PM
Your first step is to get the behavior of pressing that button into a method that doesn't require pressing the button. Once that's done, then your test calls that method.
Based on whatever it actually does, you write your asserts for it.
Unit testing is pretty tricky stuff.
Based on whatever it actually does, you write your asserts for it.
Unit testing is pretty tricky stuff.
This post has been edited by MentalFloss: 23 May 2010 - 11:57 PM
#3
Re: Unit Testing
Posted 24 May 2010 - 01:10 AM
You should use the NUnit or some other program for unit testing. I believe NUnit has some preety good examples on their web page that you can follow.
This post has been edited by FlashM: 24 May 2010 - 01:11 AM
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|