示例#1
0
        public void FromAppConfig_Returns_Correct_Installer()
        {
            // arrange
            IWindsorContainer container = new WindsorContainer();
            IWindsorInstaller installer = PropertiesSubSystem.FromAppConfig();

            // act
            container.Install(installer);

            // assert
            PropertiesSubSystem subsystem = container.Kernel.GetSubSystem <PropertiesSubSystem>(PropertiesSubSystem.SubSystemKey);

            Assert.AreEqual("Mihir", subsystem.Resolver.GetValue("name"));
            Assert.AreEqual(31, subsystem.Resolver.GetValue <int>("age"));
        }
示例#2
0
 public void Setup()
 {
     m_container = new WindsorContainer();
     m_propertySubSystemInstaller = PropertiesSubSystem.FromAppConfig();
     m_container.Install(m_propertySubSystemInstaller);
 }