This project is read-only.


Jul 18, 2011 at 10:01 PM

The type Ploeh.AutoFixture.Xunit.UnitTest.MyClass I think it should be inside the TestTypeFoundation project, or no? The Ploeh.AutoFixture.Xunit.UnitTest project references the TestTypeFoundation project.

Jul 18, 2011 at 11:26 PM

I can certainly understand why you would think so, but I don't agree, and let me explain why:

There are, sprinkled all over the AutoFixture unit test code base, lots of different MyClass definitions. Each is typically used in a very narrow scope, and usually in a sort of integration test intended for either publication (e.g. in a blog post) or otherwise as an introduction to an API. All those different MyClass definitions aren't necessarily compatible.

In the last year or so, I've begun to include a class called Scenario which is intended to demonstrate the core features of an API if you've never seen it before. The idea is that as a beginner, one should be able to examine the Scenario file to get an idea about the API in question. This wasn't something I planned from the very outset of AutoFixture, but rather a concept I've evolved along the way. Perhaps there's even a better name for this kind of test than Scenario...

Most of the MyClass definitions exist to support Scenarios, so don't belong in the TestTypeFoundation project. This philosophy has never been documented anywhere, and perhaps it's even inconsistently applied, so I can understand why you ask :)

Jul 18, 2011 at 11:38 PM

OK! Now I understand. Again, this is one of the most carefully written code-bases, really.