---
title: "Isolator Feature Focus: Faking Collections"
url: "https://osherove.com/blog/2008/11/2/isolator-feature-focus-faking-collections.md"
canonical: "https://osherove.com/blog/2008/11/2/isolator-feature-focus-faking-collections.html"
published: "2008-11-02T05:57:32"
updated: "2008-11-02T05:57:32"
tags: [".NET", "Agile", "FeatureFocus", "Typemock", "Unit Testing"]
author: "Roy Osherove"
description: "Another cool feature in Isolator is the ability to fake values that will be returned from custom collections (anything that inherits from IEnumerable as long as it is not in mscorlib - for example - sharepoint lists).…"
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/"
---

# Isolator Feature Focus: Faking Collections

By Roy Osherove November 2, 2008 In [.NET](https://osherove.com/blog/category/net), [Agile](https://osherove.com/blog/category/agile), [FeatureFocus](https://osherove.com/blog/category/featurefocus), [Typemock](https://osherove.com/blog/category/typemock), [Unit Testing](https://osherove.com/blog/category/unit-testing)

**Historical article** · Originally published November 2, 2008; technical details may be outdated.

Another cool feature [in Isolator](http://www.typemock.com/commdl.php) is the ability to fake values that will be returned from custom collections (anything that inherits from IEnumerable as long as it is not in mscorlib - for example - sharepoint lists).

With the new version you can now do the following with collections:

**1) Return a fake value from a specific collection item (even if the collection has not been faked yet)**

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

**2) Return a list of fake values when someone uses the collection**

![image](https://osherove.com/img/wb/p.net_blogs_rosherove_WindowsLiveWriter_IsolatorFeatureFocusFakingCollections_D425_image_thumb_1.png)

## More in .NET

[All posts in .NET](https://osherove.com/blog/category/net)

- Nov 26, 2008

    ### [Isolation Syntax for VB.NET - Your comments please](https://osherove.com/blog/2008/11/26/isolation-syntax-for-vbnet-your-comments-please.html)

- Nov 24, 2008

    ### [Announcing Isolator for Sharepoint with a free full license for bloggers](https://osherove.com/blog/2008/11/24/announcing-isolator-for-sharepoint-with-a-free-full-license.html)

- Nov 2, 2008

    ### [Isolator Feature Focus: Duck Typing and Isolate.Swap](https://osherove.com/blog/2008/11/2/isolator-feature-focus-duck-typing-and-isolateswap.html)

- Oct 28, 2008

    ### [PDC 2008 Videos](https://osherove.com/blog/2008/10/28/pdc-2008-videos.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/
