Exemple #1
0
    public void OnControlGroupShouldShiftToOnFixWhenGroupCantMove()
    {
        IGridState onControlGroupState = new OnControlGroupState(gridMock);

        gridMock.ControllingGroup.Returns(true);

        onControlGroupState.OnUpdate();
        gridMock.DidNotReceive().SetState(GridStates.OnFix);

        gridMock.ControllingGroup.Returns(false);

        onControlGroupState.OnUpdate();
        gridMock.Received().SetState(GridStates.OnFix);
    }
Exemple #2
0
    public void OnControlGroupShouldShiftToOnFixWhenGroupCantMove()
    {
        IGridState onControlGroupState = new OnControlGroupState(gridMock);
        gridMock.ControllingGroup.Returns(true);

        onControlGroupState.OnUpdate();
        gridMock.DidNotReceive().SetState(GridStates.OnFix);

        gridMock.ControllingGroup.Returns(false);

        onControlGroupState.OnUpdate();
        gridMock.Received().SetState(GridStates.OnFix);
    }