---
title: "[Article] Fun with Unit Tests – Testing abstract classes"
url: "https://osherove.com/blog/2003/9/24/article-fun-with-unit-tests-testing-abstract-classes.md"
canonical: "https://osherove.com/blog/2003/9/24/article-fun-with-unit-tests-testing-abstract-classes.html"
published: "2003-09-24T21:21:00"
updated: "2003-09-24T21:21:00"
tags: [".Net Original"]
author: "Roy Osherove"
description: "Just posted my latest article: Fun with Unit Tests – Testing abstract classes Summary In this article I’ll be looking into a trickier part of unit testing– testing the functionality of classes who cannot be instantiated…"
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/"
---

# \[Article\] Fun with Unit Tests – Testing abstract classes

By Roy Osherove September 24, 2003 In [.Net Original](https://osherove.com/blog/category/net-original)

**Historical article** · Originally published September 24, 2003; technical details may be outdated.

Just posted my latest article:

[Fun with Unit Tests – Testing abstract classes](https://osherove.com/rosherove/posts/29038.aspx)

###### Summary

_In this article I’ll be looking into a trickier part of unit testing– testing the functionality of classes who cannot be instantiated on their own, abstract classes._

_I’ll show how to overcome this obstacle using “Mock Objects”, a technique which has a whole methodology behind it all on its own. We’ll see how mock objects provide us with abilities that let us query what’s happening inside our derived class._  

[Read it](http://weblogs.asp.net/rosherove/posts/29038.aspx). Have fun. Be productive.

## More in .Net Original

[All posts in .Net Original](https://osherove.com/blog/category/net-original)

- Sep 28, 2003

    ### [\[New article\]: Creating a generic Site-To-RSS tool (site scraping)](https://osherove.com/blog/2003/9/28/new-article-creating-a-generic-site-to-rss-tool-site-scrapin.html)

- Sep 25, 2003

    ### [AmazReplacer - Convert Amazon's URL into your referrer URL automatically](https://osherove.com/blog/2003/9/25/amazreplacer-convert-amazons-url-into-your-referrer-url-auto.html)

- Sep 23, 2003

    ### [I'm available](https://osherove.com/blog/2003/9/23/im-available.html)

- Sep 21, 2003

    ### [\[Article\] Introduction to Test-driven development with NUnit and the NUnit-Add-in](https://osherove.com/blog/2003/9/21/article-introduction-to-test-driven-development-with-nunit-a.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/
