public void CanExtendComponentsRegisteredInCode() { using (IWindsorContainer container = new RhinoContainer()) { container.Register(Component.For <GstCalculator>() .Named("gstcalculator") .DependsOn(Property.ForKey("GstRate").Eq(15m))); IWindsorInstaller installer = BinsorScript.Inline(new StringBuilder().AppendLine("extend \"gstcalculator\":") .AppendLine(" GstRate = decimal(50)").ToString()); installer.Install(container, null); GstCalculator calculator = container.Resolve <GstCalculator>(); Assert.AreEqual(50m, calculator.GstRate); } }
public void SetUp() { installer = new Installer(); container = new WindsorContainer(); installer.Install(container, null); }