Directory structure for unit tests?

Feb 5, 2011 at 5:33 PM

According to the FAQ (, Unit tests for individual modules are to be found in the directory Orchard.Tests.Modules.

On  my source enlistment this is found at OrchardEnlistment\src\Orchard.Tests.Modules.

Are tests for core and non-core modules all supposed to be located here?

If so, some appear to be missing. I have a test for CodeGeneration (non-core) but not for Scheduling (core). should I expect to find unit tests for all core items somewhere?

When creating a new user contributed module for the Gallery, how should the unit and integration tests for this new module be packaged so that the tests get deployed to the proper directories?

Feb 6, 2011 at 3:27 AM

Hi Jonny,

The unit tests for Core modules go into Orchard.Core.Tests. The unit tests for the non-core default modules (the ones that come with vanilla Orchard releases) end up in Orchard.Tests.Modules.

As for the last question about unit tests for contributed modules, we'll have to figure that out. I think Sebastien was looking at it at some point, he might want to chime in.



Feb 6, 2011 at 3:28 AM

Oh and if you see that an existing module (core or not) is lacking in unit test coverage, be sure to send me a patch for it (via a fork) and i'll get it in for you.