---
title: "Doing Test Driven Development with no DLLs"
url: "https://osherove.com/blog/2004/2/6/doing-test-driven-development-with-no-dlls.md"
canonical: "https://osherove.com/blog/2004/2/6/doing-test-driven-development-with-no-dlls.html"
published: "2004-02-06T12:06:00"
updated: "2004-02-06T12:06:00"
tags: ["Tips & Tricks"]
author: "Roy Osherove"
description: "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…"
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# Doing Test Driven Development with no DLLs

By Roy Osherove February 6, 2004 In [Tips & Tricks](https://osherove.com/blog/category/tips-tricks)

**Historical article** · Originally published February 6, 2004; technical details may be outdated.

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.

## More in Tips & Tricks

[All posts in Tips & Tricks](https://osherove.com/blog/category/tips-tricks)

- Mar 27, 2004

    ### [A cool Selection Expansion macro](https://osherove.com/blog/2004/3/27/a-cool-selection-expansion-macro.html)

- Feb 29, 2004

    ### [Problem And Solution: "Login failes for some users on a DotNetNuke based portal"](https://osherove.com/blog/2004/2/29/problem-and-solution-quotlogin-failes-for-some-users-on-a-do.html)

- Jan 2, 2004

    ### [Query Analyzer Tricks](https://osherove.com/blog/2004/1/2/query-analyzer-tricks.html)

- Dec 20, 2003

    ### [Problem and solution: Renaming htm file to aspx may cause javascript trouble](https://osherove.com/blog/2003/12/20/problem-and-solution-renaming-htm-file-to-aspx-may-cause-jav.html)


---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
