Agility eLetter September, 2004

 

In this issue...

In this issue, we have a detailed article on Test Driven Development: Part II – Mock Objects.

 

Abstract: In this second of the three part series on Test Driven Development, we focus on using Mock objects to isolate our code from its dependencies so as to make it testable and also to further development when the dependent components are not quite ready or available. In this article we discuss the benefits of Mock objects, show how to write one and finally present an example that uses the EasyMock framework. In Part III we will look at continuous integration. Please visit http://www.agiledeveloper.com/download.aspx to download the complete article from the Agile Developer web site.

Message from us

Better late than never. Past few weeks have been busier than usual. Software development projects for clients stretched the limits of our usually busy schedule of teaching and speaking in conferences. In addition, we have embarked on another project that we will announce here when it attains fruition in the next few months. So, for a minute imagine it is still September and enjoy the article on Mock objects.

 

Please send your comments on just about any thing. If you have any suggestions for the quiz corner or interesting articles, etc. that you like for us to look at, please email us. We look forward to hearing from our readers.

 

If you would like any question to be addressed or topic to be discussed, please send us an email at agility@agiledeveloper.com. At the end of the year, one person will be randomly selected from the list of respondents for a special prize. We would like to hear from you.

Please send suggestions, corrections and comments to agility@agiledeveloper.com.

Quiz corner

How many threads are available for you in the Thread Pool in .NET?

Send your response to agility@agiledeveloper.com, and you may become the winner of 2004 Agility special prize. The more quizzes you answer, the better your chances are to be a winner!


Quiz from the past issue

What the difference between casting and using “as” in C#?

 

Answer!

The first response for this quiz came from Dinesh. Casting may throw an exception at runtime if the case is not valid. “as” on the other hand gives you a null reference. "as” can be used only on reference types. Casting simply performs a class cast at the IL level. The as operator however, performance an instance check (like the is operator does).

Subscription Information

To subscribe or unsubscribe to the free issues of Agility eLetter, please visit http://www.agiledeveloper.com/eLetter.aspx.

Thus spake...

‘A pessimist is one who makes difficulties of his opportunities and an optimist is one

who makes opportunities of his difficulties,’ – Harry Truman.