public void MakeOreHoldActiveShouldMakeOreHoldActive() { //Arrange var eveInvWindow = new Mock <IEveInvWindow>(); eveInvWindow.Setup(eiw => eiw.IsValid).Returns(true); _eveWindowProvider.Setup(ewp => ewp.GetInventoryWindow()).Returns(eveInvWindow.Object); var eveInvChildWindow = new Mock <IEveInvChildWindow>(); eveInvChildWindow.Setup(eicw => eicw.IsValid).Returns(true); eveInvWindow.Setup(eiw => eiw.GetChildWindow(It.Is <Int64>(i => i == 1), It.Is <string>(s => s == InventoryProvider.ShipOreHoldName))) .Returns(eveInvChildWindow.Object); _shipCache.Setup(sc => sc.Id).Returns(1); //Act _inventoryProvider.MakeOreHoldActive(); //Assert _eveWindowProvider.Verify(ewp => ewp.GetInventoryWindow(), Times.Once()); eveInvWindow.Verify(eiw => eiw.GetChildWindow(It.Is <Int64>(i => i == 1), It.Is <string>(s => s == InventoryProvider.ShipOreHoldName)), Times.Once()); eveInvChildWindow.Verify(eicw => eicw.MakeActive(), Times.Once()); }