public void GuyWire_Registers_Correct_Components() { var guyWire = new GuyWire(); var count = guyWire.ComponentsInfo.Count(); Assert.Equal(4, count); }
public InstallersTests() { _container = new WindsorContainer(); _guyWire = MockRepository.GenerateMock<GuyWire>(_container); _guyWire.Expect(g => g.Container).Return(_container); _guyWire.Expect(g => g.Wire()).CallOriginalMethod(OriginalCallOptions.CreateExpectation); }
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))); }
public void GuyWire_Has_Default_Container() { var guyWire = new GuyWire(); Assert.NotNull(guyWire.Container); }
protected void CreateGuyWire() { guyWire = new GuyWire(); guyWire.Wire(); }