public void AfterSelectingTwoSlotsSelectionResets() { SlotSelection slotSelection = CreateSlotSelection(); SlotSelectionServer slotSelectionServer1 = CreateSlotSelectionServer(true, true); SlotSelectionServer slotSelectionServer2 = CreateSlotSelectionServer(true, true); slotSelection.SelectSlot(slotSelectionServer1); slotSelection.SelectSlot(slotSelectionServer2); Assert.AreEqual(0, slotSelection.SelectedSlotSevers.Count); }
public void DontMoveAndReceiveIfCantReceive() { SlotSelection slotSelection = CreateSlotSelection(); StubSlotSelectionServer slotSelectionServer1 = CreateSlotSelectionServer(true, true) as StubSlotSelectionServer; StubSlotSelectionServer slotSelectionServer2 = CreateSlotSelectionServer(true, false) as StubSlotSelectionServer; slotSelection.SelectSlot(slotSelectionServer1); slotSelection.SelectSlot(slotSelectionServer2); Assert.IsFalse(slotSelectionServer1.TakePieceWasCalled); Assert.IsFalse(slotSelectionServer2.ReceivePieceWasCalled); }
public void SelectingTwoSlotsWillCheckIfTheyCanMoveAndReceivePiece() { SlotSelection slotSelection = CreateSlotSelection(); StubSlotSelectionServer slotSelectionServer1 = CreateSlotSelectionServer(true, true) as StubSlotSelectionServer; StubSlotSelectionServer slotSelectionServer2 = CreateSlotSelectionServer(true, true) as StubSlotSelectionServer; slotSelection.SelectSlot(slotSelectionServer1); slotSelection.SelectSlot(slotSelectionServer2); Assert.IsTrue(slotSelectionServer1.CanMovePieceWasCalled); Assert.IsTrue(slotSelectionServer2.CanReceivePieceWasCalled); }
public void SelectingThreeStartNewSelection() { SlotSelection slotSelection = CreateSlotSelection(); SlotSelectionServer slotSelectionServer1 = CreateSlotSelectionServer(true, true); SlotSelectionServer slotSelectionServer2 = CreateSlotSelectionServer(true, true); SlotSelectionServer slotSelectionServer3 = CreateSlotSelectionServer(true, true); slotSelection.SelectSlot(slotSelectionServer1); slotSelection.SelectSlot(slotSelectionServer2); slotSelection.SelectSlot(slotSelectionServer3); Assert.AreEqual(1, slotSelection.SelectedSlotSevers.Count); Assert.AreEqual(slotSelectionServer3, slotSelection.SelectedSlotSevers[0]); }
public void SelectOneSlot() { SlotSelection slotSelection = CreateSlotSelection(); SlotSelectionServer slotSelectionServer = CreateSlotSelectionServer(true, true); slotSelection.SelectSlot(slotSelectionServer); Assert.AreEqual(1, slotSelection.SelectedSlotSevers.Count); }
public void SelectSlot(SlotSelectionServer slotSelectionServer) { slotSelection.SelectSlot(slotSelectionServer); }