Hi Steve,
I'm using this kind of tests (functional/synthetic) on a regular
basis. There are a few common scenarios:
1. Simple sanity checks, when same Autofac modules are used for
production purposes and in setting up test-fixtures for the repository
tests (such fixtures use IoC internally to keep code really simple).
If something is wrong with the IoC setup, then related fixtures would
not even start.
2. Smoke tests, when a few related Autofac modules are loaded together
in a test fixture (missing dependencies are generally resolved by mock
container) and then a few complex interactions are fired. Some sanity
checks and assertions are launched along the process and after it.
This helps to catch a few bugs in multi-threading or scheduling type
of logic.
3. Full stress tests (are usually manually launched from an executable
that is instrumented with statistics capturing), where multiple
subsystems are wired together with Autofac. For example, we could drop
WCF layer and wire client-side functionality directly to the server-
side code with full paging, batching and auth logic; latter could
wired directly to the DAL layer working with in-memory or
prepopulated database. Adding a few threads (i.e. 20) doing resource
intensive operations would give some indication how the entire
infrastructure deals with dead-locks and performance bottlenecks.
That's just a few scenarios from the top of my head. You don't
necessarily need Autofac for these, but using it makes everything a
pleasure.
Best regards,
Rinat Abdullin
http://abdullin.com
On Aug 24, 9:12 pm, Steve U <
downcha...@gmail.com> wrote:
> Has anyone set up unit tests (or whatever you would like to call them)
> to verify that the autofac config (be it the XML based or fluent API)
> can resolve types etc?
>
> I am thinking along these kind of lines:
http://stackoverflow.com/questions/731616/castle-windsor-how-to-test-...