I use Windsor in an ASP.NET MVC project where I wrote a simple test to make sure that all controllers can be created (i.e. their dependencies can be resolved).
I have a test for each website configuration (for example, "development", "test", "someProductionSite", etc.), where I create my Windsor container with this specific configuration and go through all the non-abstract IController implementations. checking that I can resolve an instance of each of them.
Since the factory controller is the only entry point to the application that will lead to the container. Resolve (...), I am 100% sure that all configurations are valid.
As a rule, I have found that written tests that function as statements about the entire system are extremely useful and valuable.
eg. I also claim that all controller actions are virtual, which is a requirement because I use Castle's automatic transaction management to manage the controllerβs transactions with transactions.
mookid8000
source share