<commit_before>package tictactoe.BigData;

import org.testng.annotations.Test;
import tictactoe.GameMechanics.Board;
import tictactoe.GameMechanics.Player;

import static org.testng.Assert.*;

public class TestOption {
    @Test
    public void TestConstructor() {
        Board emptyBoard = new Board();
        Option option = new Option(emptyBoard);

        WinLossStats winLossStats1InOption = option.getWinLossStats();
        assertNotNull(winLossStats1InOption);

        Board boardInOption = option.getBoard();
        assertEquals(boardInOption, emptyBoard);

        option.registerWinner(Player.O);
        WinLossStats winLossStats2InOption = option.getWinLossStats();
        float goodnessBeforeRegisteringWin = winLossStats1InOption.getGoodness(Player.O);
        float goodnessAfterRegisteringWin = winLossStats2InOption.getGoodness(Player.O);
        assertTrue(goodnessAfterRegisteringWin > goodnessBeforeRegisteringWin);
    }
}<commit_msg>adding unit tests for Option<commit_after>package tictactoe.BigData;

import org.testng.annotations.Test;
import tictactoe.GameMechanics.Board;
import tictactoe.GameMechanics.Player;

import static org.testng.Assert.*;

public class TestOption {
    @Test
    public void TestConstructor() {

        /* exercise the constructor */
        Board emptyBoard = new Board();
        Option option = new Option(emptyBoard);

        /* getWinLossStats() should return a WinLossStats object */
        assertNotNull(option.getWinLossStats());

        /* getBoard() should return the empty board we passed in to the constructor */
        assertEquals(option.getBoard(), emptyBoard);

        /* registering a winner with register() should change the toString() value of this Option */
        String optionAsStringBeforeRegisterWinner = option.toString();
        option.registerWinner(Player.O);
        String optionAsStringAfterRegisterWinner = option.toString();
        assertNotSame(optionAsStringBeforeRegisterWinner, optionAsStringAfterRegisterWinner);
    }
}
{'fraction_non_alphanumeric': 0.08345679012345679, 'fraction_numerical': 0.0024691358024691358, 'mean_word_length': 3.8701923076923075, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2133259', 'n_tokens_mistral': 547, 'n_tokens_neox': 527, 'n_words': 123}