コード例 #1
0
ファイル: GridStateTest.cs プロジェクト: Mojopon/ThreeSeven
    public void DeletingShouldShiftToDeletedWhenBlocksCompleteMoving()
    {
        IGridState deletingState = new DeletingState(gridMock);
        gridMock.ProcessDeleting().Returns(true);

        deletingState.OnUpdate();
        gridMock.DidNotReceive().SetState(GridStates.Deleted);

        gridMock.ProcessDeleting().Returns(false);

        deletingState.OnUpdate();
        gridMock.Received().SetState(GridStates.Deleted);
    }
コード例 #2
0
    public void DeletingShouldShiftToDeletedWhenBlocksCompleteMoving()
    {
        IGridState deletingState = new DeletingState(gridMock);

        gridMock.ProcessDeleting().Returns(true);

        deletingState.OnUpdate();
        gridMock.DidNotReceive().SetState(GridStates.Deleted);

        gridMock.ProcessDeleting().Returns(false);

        deletingState.OnUpdate();
        gridMock.Received().SetState(GridStates.Deleted);
    }