protected override void ConfigureContainer(StructureMap.IContainer container) { base.ConfigureContainer(container); new Bootstrapper().BootstrapApplication(container); container.Configure(cfg => { cfg.For <PlayerBuilder>() .EnrichAllWith(x => x.ForSpec(new PlayerSpec().WithController(new NaivePlayerController()))); cfg.For <IEventAggregator>().Singleton().Use <MockEventAggregator>(); //cfg.For<IPlayerController>().Use<NaivePlayerController>(); }); _eventAggregator = container.GetInstance <IEventAggregator>() as MockEventAggregator; container.SetDefaultsToProfile("UnitTests"); }