public void Can_split_configuration_between_multiple_component_elements() { // see http://stackoverflow.com/questions/3253975/castle-windsor-with-xml-includes-customization-problem for real life scenario container.Install(Config.FromXmlFile(ConfigHelper.ResolveConfigPath("Configuration/OneComponentInTwoPieces.xml"))); var service = container.Resolve <ISimpleService>("Foo"); var interceptor = container.Resolve <CountingInterceptor>("a"); service.Operation(); Assert.AreEqual(1, interceptor.InterceptedCallsCount); }
public void Private_setter_does_not_get_called_when_using_config() { var container = new WindsorContainer(); container.Install( Config.FromXmlFile( ConfigHelper.ResolveConfigPath("Configuration2/class_with_private_setter.xml"))); var item = container.Resolve <IMyConfiguration>(); Assert.AreEqual(1234, item.Port); }