public void Ctor_With_No_Parameters_Test()
        {
            // act
              PropertyResolvingWindsorContainer container = new PropertyResolvingWindsorContainer();

              // assert
              Assert.IsInstanceOf<PropertiesInterpreter>(container.Interpreter);

              // get properties subsystem from kernel
              PropertiesSubSystem subsystem = container.Kernel.GetSubSystem<PropertiesSubSystem>(PropertiesSubSystem.SubSystemKey);

              // assert
              Assert.IsNotNull(subsystem);
              Assert.AreEqual("Mihir", subsystem.Resolver.GetValue("name"));
        }
Exemplo n.º 2
0
        public void Ctor_With_No_Parameters_Test()
        {
            // act
            PropertyResolvingWindsorContainer container = new PropertyResolvingWindsorContainer();

            // assert
            Assert.IsInstanceOf <PropertiesInterpreter>(container.Interpreter);

            // get properties subsystem from kernel
            PropertiesSubSystem subsystem = container.Kernel.GetSubSystem <PropertiesSubSystem>(PropertiesSubSystem.SubSystemKey);

            // assert
            Assert.IsNotNull(subsystem);
            Assert.AreEqual("Mihir", subsystem.Resolver.GetValue("name"));
        }
Exemplo n.º 3
0
        public void Ctor_Test()
        {
            // arrange
            string path = EmbeddedResourceUtil.ExportToPath("Castle.Windsor.Extensions.Test.data", "castle.config", Path.GetTempPath());

            // act
            PropertyResolvingWindsorContainer container = new PropertyResolvingWindsorContainer(path);

            // assert
            Assert.IsInstanceOf <PropertiesInterpreter>(container.Interpreter);

            // get properties subsystem from kernel
            PropertiesSubSystem subsystem = container.Kernel.GetSubSystem <PropertiesSubSystem>(PropertiesSubSystem.SubSystemKey);

            // assert
            Assert.IsNotNull(subsystem);
            Assert.AreEqual("this is string", subsystem.Resolver.GetValue("strParam"));
        }
        public void Ctor_Test()
        {
            // arrange
              EmbeddedResourceUtil.ExportToPath("Castle.Windsor.Extensions.Test.data", "castle.config", Path.GetTempPath());
              string path = Path.GetTempPath() + "\\castle.config";

              // act
              PropertyResolvingWindsorContainer container = new PropertyResolvingWindsorContainer(path);

              // assert
              Assert.IsInstanceOf<PropertiesInterpreter>(container.Interpreter);

              // get properties subsystem from kernel
              PropertiesSubSystem subsystem = container.Kernel.GetSubSystem<PropertiesSubSystem>(PropertiesSubSystem.SubSystemKey);

              // assert
              Assert.IsNotNull(subsystem);
              Assert.AreEqual("this is string", subsystem.Resolver.GetValue("strParam"));
        }