public void TrySwitchHoveredPUReceiver_ArgIsNotNull_ArgIsHoverable_CurHoveredIsNull_SetItHovered()
    {
        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));
    }
    public void TrySwitchHoveredPUReceiver_ArgIsNotNull_ArgIsHoverable_CallsArgBecomeHovered()
    {
        PickUpReceiverSwitch <ITestPickUpReceiver> purSwitch = new PickUpReceiverSwitch <ITestPickUpReceiver>();
        ITestPickUpReceiver hoveredPUR = Substitute.For <ITestPickUpReceiver>();

        hoveredPUR.IsHoverable().Returns(true);

        purSwitch.TrySwitchHoveredPUReceiver(hoveredPUR);

        hoveredPUR.Received(1).BecomeHovered();
    }
    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();
    }
    public void TrySwitchHoveredPUReceiver_ArgIsNotNull_ArgIsHoverable_ArgAndCurHoveredAreNotSame_SetsTheNewOneHovered()
    {
        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));
        ITestPickUpReceiver otherHoveredPUR = Substitute.For <ITestPickUpReceiver>();

        otherHoveredPUR.IsHoverable().Returns(true);
        Assert.That(purSwitch.GetHoveredPUReceiver(), Is.Not.SameAs(otherHoveredPUR));

        purSwitch.TrySwitchHoveredPUReceiver(otherHoveredPUR);

        Assert.That(purSwitch.GetHoveredPUReceiver(), Is.SameAs(otherHoveredPUR));
    }