public void Startables_Without_priority_are_started_last() { using (var container = new WindsorContainer()) { var state = new StartingState(); container.AddFacility<StartableFacility>(f => f.DeferredStart()); container.Install(new ActionBasedInstaller(c => c.Register( Component.For<StartingState>().Instance(state), Component.For<StartableWithPriority2>().ImplementedBy<StartableWithPriority2>(), Component.For<StartableWithPriority1>().ImplementedBy<StartableWithPriority1>().StartPriority(1) ))); Assert.AreEqual(state.Progress, "12"); } }
public StartableWithPriority2(StartingState state) { this.state = state; }