The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Doing Test Driven Development with no DLLs

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Roy Osherove

Posts: 1807
Nickname: royo
Registered: Sep, 2003

Roy Osherove is a .Net consultant based in Israel
Doing Test Driven Development with no DLLs Posted: Feb 6, 2004 6:43 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Roy Osherove.
Original Post: Doing Test Driven Development with no DLLs
Feed Title: ISerializable
Feed URL: http://www.asp.net/err404.htm?aspxerrorpath=/rosherove/Rss.aspx
Feed Description: Roy Osherove's persistent thoughts
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Roy Osherove
Latest Posts From ISerializable

Advertisement
Doing test driven development often(well, practically always) entails testing against a class library in your tests. It's just the easiest way to test functionality of objects (you need to reference those objects somehow, right?) so, most of the time you would create a test project and a tested library project before you ever create a GUI or a console application that uses that library.
But what happens when you have a very small project? say, a very simple console application with a very small set of functionality? Well, in the TDD manner you would have the console app built along with a library project that contains the classes that do the functionality. But it may seem a bit like overkill to have 3 separate projects for a such a simple task. Or maybe the customer will not want to distribute the console app along with a dll for something so simple as say... renaming files in the directory based on some simple business logic. Maybet he requirement is that the user should only have to copy one exe file into the directory and run it with no hassles.
 
So.After all this text, what do you do when you can't use a library project for a very simple functionality?
 
You don't create a library project. Instead you create the necessary class(es) in your console app.
Then you link to those class files from your test project:
 
“MyTestProject->Add existing files->select the class file-> open the small menu on the “open” button and choose “link”.
 
Now you have a physical reference to the classes but you actually have only one instance of the class files for you to work with. This is as good as it gets for very small projects with a harsh requirement of “no DLLs please”. Use it wisely, grasshopper.

Read: Doing Test Driven Development with no DLLs

Topic: From SOAP 1.1 to SOAP 1.2 in 9 points Previous Topic   Next Topic Topic: Reflecting on properties and fields (literally and figuratively)

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use