public void ShouldBeGameOverWhenCantAddGroup() { IGridState readyFoNextGroupState = new ReadyForNextGroupState(setting, gridMock, groupFactoryMock, Substitute.For <OnDeleteEndEventHandler>()); gridMock.AddGroup(Arg.Any <IGroup>()).Returns(false); readyFoNextGroupState.OnUpdate(); groupFactoryMock.Received().Create(setting); gridMock.Received().GameOver(); }
public void ReadyForNextGroupShouldCreateGroupToAdd() { IGridState readyFoNextGroupState = new ReadyForNextGroupState(setting, gridMock, groupFactoryMock, Substitute.For <OnDeleteEndEventHandler>()); gridMock.AddGroup(Arg.Any <IGroup>()).Returns(true); readyFoNextGroupState.OnUpdate(); groupFactoryMock.Received().Create(setting); gridMock.Received().SetState(GridStates.OnControlGroup); }
public void ShouldBeGameOverWhenCantAddGroup() { IGridState readyFoNextGroupState = new ReadyForNextGroupState(setting, gridMock, groupFactoryMock, Substitute.For<OnDeleteEndEventHandler>()); gridMock.AddGroup(Arg.Any<IGroup>()).Returns(false); readyFoNextGroupState.OnUpdate(); groupFactoryMock.Received().Create(setting); gridMock.Received().GameOver(); }
public void ReadyForNextGroupShouldCreateGroupToAdd() { IGridState readyFoNextGroupState = new ReadyForNextGroupState(setting, gridMock, groupFactoryMock, Substitute.For<OnDeleteEndEventHandler>()); gridMock.AddGroup(Arg.Any<IGroup>()).Returns(true); readyFoNextGroupState.OnUpdate(); groupFactoryMock.Received().Create(setting); gridMock.Received().SetState(GridStates.OnControlGroup); }