def test_has_all_values_when_has_does_not_have_all(player_positions, values):
    # given
    ajud = Ajudicator(None)

    # when
    result = ajud.has_all_values(player_positions, values)

    # then
    assert not result
def test_get_all_columns(row_length, expected_sublists):
    # given
    board = Board(row_length)
    ajud = Ajudicator(board)

    # when
    column_sublists = ajud.get_all_columns()

    # then
    assert column_sublists == expected_sublists
def test_contains_column_when_no_column(row_length, player_positions):
    # given
    board = Board(row_length)
    ajud = Ajudicator(board)

    # when
    result = ajud.contains_column(player_positions)

    # then
    assert not result
def test_is_start_of_row_when_not_start(row_length, position):
    # given
    board = Board(row_length)
    ajud = Ajudicator(board)

    # when
    result = ajud.is_start_of_row(position)

    # then
    assert not result
def test_is_a_row_when_not_a_row(row_length, nums):
    # given
    board = Board(row_length)
    ajud = Ajudicator(board)

    # when
    result = ajud.is_a_row(nums)

    # then
    assert not result
def test_gets_all_sublists(row_length, original_list, expected_sublists):
    # given
    board = Board(row_length)
    ajud = Ajudicator(board)

    # when
    sublists = ajud.get_all_sublists(original_list, row_length)

    # then
    assert sublists == expected_sublists
def test_contains_winning_combination_when_contains_combination(row_length, player_positions):
    # given
    board = Board(row_length)
    ajud = Ajudicator(board)

    # when
    result = ajud.contains_winning_combination(player_positions)

    # then
    assert result
def test_no_moves_remain_when_no_moves_remain(row_length, board_positions):
    # given
    board = Board(row_length)
    board.board_positions = board_positions
    sample_player1 = Player("X", board)
    sample_player2 = Player("O", board)
    ajud = Ajudicator(board, sample_player1, sample_player2)

    # when
    result = ajud.no_moves_remain()

    # then
    assert result
def test_find_which_player_has_won(row_length, board_positions, expected_winner):
    # given
    board = Board(row_length)
    board.board_positions = board_positions
    sample_player1 = Player("X", board)
    sample_player2 = Player("O", board)
    ajud = Ajudicator(board, sample_player1, sample_player2)

    # when
    winning_player = ajud.find_which_player_has_won()

    # then
    assert winning_player == expected_winner
def test_some_player_has_won_when_no_winner(row_length, board_positions):
    # given
    board = Board(row_length)
    board.board_positions = board_positions
    sample_player1 = Player("X", board)
    sample_player2 = Player("O", board)
    ajud = Ajudicator(board, sample_player1, sample_player2)

    # when
    result = ajud.some_player_has_won()

    # then
    assert not result