|
N a v a n e e t h wrote: Is it like, create the Account class first with empty Deposit() method and write test case for it, make them fail, come back to Account class and write code for it, again execute test ?
With the current editing environments/compilers, that is pretty much what you need to do. You can write the test code first, knowing it won't compile, as that will give you the syntax of how your class will be used. Then write just enough of the class to get everything to compile. From there, your tests should fail and you can start writing the code needed to make them pass.
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
Thanks Scott, your reply is much appreciated. Is this the way you are following ? Are you using TDD ? If yes, are you successful in that ?
|
|
|
|
|
N a v a n e e t h wrote: Is this the way you are following ? Are you using TDD ? If yes, are you successful in that ?
Actually, I don't really follow the ideas of TDD. I think it has it's uses and can be a very valueable tool in the right circumstances. I do still write unit tests for my projects, but I usually write them as I create pieces of functionality or after I get a component completed and I think it is working.
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
Scott Dorman wrote: I get a component completed and I think it is working.
Exactly the same think I am doing. I find writing test first as kinda time consuming.
|
|
|
|
|
N a v a n e e t h wrote: I find writing test first as kinda time consuming.
I'm not sure it's any more time consuming than writing it afterwards. The problem I have with it is that you don't always know up-front how things will be structured or what methods you may need, etc. I'm all for refactoring, but I disagree with those people who think that you should constantly (or very nearly) be refactoring.
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
N a v a n e e t h wrote: how to write test code before writing the functionality ?
The philosophy behind TDD is to write a test before implementing the functionality. So go ahead and build the class to be tested, but don't write the bodies of its methods before writing their tests.
/ravi
|
|
|
|
|
Okay - do you used to do these kind of development ? Thanks for the reply.
|
|
|
|
|
I was introduced to it in 2002 and continue to use it to this day.
/ravi
|
|
|
|
|
Thanks. I have been using that for last few weeks. It looks interesting. But I am facing some problems in areas where external files are used. Suppose I have a XML file and I am creating custom objects according to the XML file values, I felt testing these kind of stuff is kinda tough. The file may change any day and our test will be invalid then. How do you manage such a scenario ? Do you mock such kind objects ?
|
|
|
|
|
N a v a n e e t h wrote: Do you mock such kind objects ?
Bingo!
/ravi
|
|
|
|
|
Means ?
|
|
|
|
|
Bingo! == "Yes, you're absolutely correct!"
/ravi
|
|
|
|
|
Ohhh - I was not knowing. Thanks
|
|
|
|
|
(C# VS 2005)
I need a function to determine
If the OS is windows 2003 or 2008
Yes. CreatiVity withOuT limiTs
|
|
|
|
|
Don't double post, it's rude. Your question has already been answered in c# forum.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Dear All,
I need to implement STRPTIME function in the Windows Mobile.I downloaded the wcelibcex-1.0 library as it was posted here.But it couldnot be run on Windows Mobile 5.0.Please help me to find a soution.This stands same for the gmtime() function and ctime.
|
|
|
|
|
Dear sir ,
i have two windows forms one is recordvideoform another is insermadiaform.
bydefault i set the recorder video form at top-center of our window.
once the recorderform pops-up then i can drag it to any place of the window like left corner or right corner or bottom of the window. then the recorderform comes to the respective place.
in the recorderform i have one button "insertmedia" when i click on the button insertmedia-window will popup.( at this stage i have two windowsforms at my system) then i insert some images or videos to my recorderform. they will add to the recorderform.
problem: if i close the insertmwdia-window form then the recorderform goes to the default position i.e at top-center of the window.
expected result: i want my recorderform window to be at the same position where i place it before clcking the :insertmedia" button on the recorderform.( like left corner or bottom or right corner) after clicking close button of the insertmediaform.
|
|
|
|
|
Please don't repost the same issue. If you look really hard at the screen you will see that it's the thread below this one.
|
|
|
|
|
Dear sir ,
i have two windows forms one is recordvideoform another is insermadiaform.
bydefault i set the recorder video form at top-center of our window.
once the recorderform pops-up then i can drag it to any place of the window like left corner or right corner or bottom of the window. then the recorderform comes to the respective place.
in the recorderform i have one button "insertmedia" when i click on the button insertmedia-window will popup.( at this stage i have two windowsforms at my system) then i insert some images or videos to my recorderform. they will add to the recorderform.
problem: if i close the insertmwdia-window form then the recorderform goes to the default position i.e at top-center of the window.
expected result: i want my recorderform window to be at the same position where i place it before clcking the :insertmedia" button on the recorderform.( like left corner or bottom or right corner) after clicking close button of the insertmediaform.
|
|
|
|
|
balaji_vbr wrote: i want my recorderform window to be at the same position where i place it before clcking the :insertmedia" button on the recorderform.( like left corner or bottom or right corner) after clicking close button of the insertmediaform
Then find out the Size and Position of the window and record it somewhere. When your form opens again retrieve the information and set the Size and Position properties to the appropriate values.
|
|
|
|
|
when i open the button standard dialogbox opend
but how to find the size,filename,dateof the selected file
in the textboxes which i created in form
|
|
|
|
|
Do not crosspost. Btw, I answered this in VB.NET forum.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Hi when i set the backcolor to transparent when i run my form, the form run slow and the backcolor label jump and after it set in transparent.how i can repair this?how can i do? Thanks
|
|
|
|
|
If you have just one label that you are setting the backcolor to transparent that shouldn't be causing the form to run slow. You can either set the label's backcolor to transparent in design so that when the form first displays it is already transparent or you can set the label's visible property to false in design, and then in your code you can set the backcolor to transparent and then the visible to true. This will stop it from first appearing with a color and then turning transparent on the screen as the form loads.
Hope this helps.
|
|
|
|
|
Create you own custom control that handles its own paint routines.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|