public void TrySwitchHoveredPUReceiver_ArgIsNotNull_ArgIsNotHoverable_DoesNotCallArgBecomeHovered() { PickUpReceiverSwitch <ITestPickUpReceiver> purSwitch = new PickUpReceiverSwitch <ITestPickUpReceiver>(); ITestPickUpReceiver hoveredPUR = Substitute.For <ITestPickUpReceiver>(); hoveredPUR.IsHoverable().Returns(false); purSwitch.TrySwitchHoveredPUReceiver(hoveredPUR); hoveredPUR.DidNotReceive().BecomeHovered(); }
public void TrySwitchHoveredPUReceiver_ArgIsNotNull_ArgIsHoverable_ArgAndCurHoveredAreSame_DoesNotCallCurHoveredBecomeHoverable() { PickUpReceiverSwitch <ITestPickUpReceiver> purSwitch = new PickUpReceiverSwitch <ITestPickUpReceiver>(); ITestPickUpReceiver hoveredPUR = Substitute.For <ITestPickUpReceiver>(); hoveredPUR.IsHoverable().Returns(true); purSwitch.TrySwitchHoveredPUReceiver(hoveredPUR); Assert.That(purSwitch.GetHoveredPUReceiver(), Is.SameAs(hoveredPUR)); purSwitch.TrySwitchHoveredPUReceiver(hoveredPUR); hoveredPUR.DidNotReceive().BecomeHoverable(); }