---
title: "TypeMOQ API"
url: "https://osherove.com/blog/2009/10/23/typemoq-api.md"
canonical: "https://osherove.com/blog/2009/10/23/typemoq-api.html"
published: "2009-10-23T07:18:14"
updated: "2009-10-23T07:18:14"
tags: ["Agile", "Typemock", "Unit Testing"]
author: "Roy Osherove"
description: "I was fiddling around with the typemock API, see what it would belike to use it in a more MOQ like manner: to support this, all the code you need, including the Faker class exists here . you’d need to reference the…"
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/"
---

# TypeMOQ API

By Roy Osherove October 23, 2009 In [Agile](https://osherove.com/blog/category/agile), [Typemock](https://osherove.com/blog/category/typemock), [Unit Testing](https://osherove.com/blog/category/unit-testing)

**Historical article** · Originally published October 23, 2009; technical details may be outdated.

I was fiddling around with the typemock API, see what it would belike to use it in a more [MOQ](http://code.google.com/p/moq/) like manner:

![image](https://osherove.com/img/wb/2b9de5c8_weblogs.asp.net_blogs_rosherove_image_thumb_7DB323F9.png)

to support this, [all the code you need, including the Faker class exists here](http://codepaste.net/kqqyrm). you’d need to reference the typemock dll and the typemock c# API dll to make it work.

I’m not sure I’m crazy about it, but it is shorter. I’m not sure it’s as readable, though.

## More in Agile

[All posts in Agile](https://osherove.com/blog/category/agile)

- Nov 1, 2009

    ### [Recommended books - part II](https://osherove.com/blog/2009/11/1/recommended-books-part-ii.html)

- Oct 29, 2009

    ### [Recommended books - part 1](https://osherove.com/blog/2009/10/29/recommended-books-part-1.html)

- Oct 18, 2009

    ### [Introducing Typemock IntelliTest](https://osherove.com/blog/2009/10/18/introducing-typemock-intellitest.html)

- Sep 30, 2009

    ### [Poll: Which mocking\\isolation framework do you use?](https://osherove.com/blog/2009/9/30/poll-which-mockingisolation-framework-do-you-use.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/
