public void TestInitialize()
        {
            _container = new RhinoContainer();

            Stream stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("Rhino.Commons.Test.Binsor.EmbeddedWindsor.boo");

            BooReader.Read(_container, stream, "EmbdeddedWindsor");
        }
Exemple #2
0
        /// <summary>
        /// Setup the IoC container and register needed types
        /// </summary>
        private void SetupContainer()
        {
            this.Container = new WindsorContainer();

            this.Container.Register(Component.For <IWindsorContainer>().Instance(this.Container));

            BooReader.Read(this.Container, "Global.boo");
        }
Exemple #3
0
        public override void TestInitialize()
        {
            base.TestInitialize();

            _container = new RhinoContainer();
            string path = Path.GetFullPath(@"Binsor\Facilities.boo");

            BooReader.Read(_container, path);
        }
        public override void TestInitialize()
        {
            base.TestInitialize();

            _container = new RhinoContainer();
            string path = Path.GetFullPath(@"Binsor\Windsor.boo");

            Console.WriteLine(path);
            BooReader.Read(_container, path);
        }
 public void CanExtendComponentsRegisteredInFacilities()
 {
     using (IWindsorContainer container = new RhinoContainer())
     {
         string path = Path.GetFullPath(@"Binsor\PreRegistrationWithExtensions.boo");
         BooReader.Read(container, path);
         ShippingCalculator calculator = container.Resolve <ShippingCalculator>();
         Assert.AreEqual(120m, calculator.ShippingCost);
     }
 }
Exemple #6
0
        public void Initialize()
        {
            if (!_isInitialized)
            {
                BooReader.Read(this);

                //Clear the configuration
                _configuration.Clear();

                _isInitialized = true;
            }
            else
            {
                ExceptionFactory.InfrastructureException
                .Add.Message("Container is already Initialized")
                .Wrap <InvalidOperationException>()
                .Raise();
            }
        }