public void Can_Show_Root_ViewModel() { var winManager = MockRepository.GenerateMock <IWindowManager>(); var shell = MockRepository.GenerateMock <IShellViewModel>(); var container = new WindsorContainer(); var guyWire = new GuyWire(container); container.Kernel.AddComponentInstance <IWindowManager>(winManager); container.Kernel.AddComponentInstance <IShellViewModel>(shell); guyWire.ShowRootModel(); winManager.AssertWasCalled(x => x.Show(Arg.Is(shell), Arg.Is <object>(null))); }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); guyWire.ShowRootModel(); }