<commit_before>package org.xander.queryAnswer;

import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;

public class QueryAnswerTest {
    String[] data = {"cat", "dog", "parrot"};
    private QueryAnswer queryAnswer;

    @Before
    public void setUp(){
        queryAnswer = new QueryAnswer(data);
    }

    @Test
    public void answerIfPresent() {
        String actualAnswer = queryAnswer.checkValuePresent("cat");
        assertEquals("yes", actualAnswer);
    }

    @Test
    public void answerIfNotPresent() {
        String actualAnswer = queryAnswer.checkValuePresent("elephant");
        assertEquals("no", actualAnswer);
    }

    @Test(expected = IllegalStateException.class)
    public void noAnswersPresent() {
        QueryAnswer queryAnswer = new QueryAnswer(new String[]{});
    }

    @Test(expected = IllegalArgumentException.class)
    public void questionNotCorrect() {
        QueryAnswer queryAnswer = new QueryAnswer(new String[]{"2"});
        queryAnswer.checkValuePresent(null);
    }

    @Test
    public void zeroLengthArgument() {
        QueryAnswer queryAnswer = new QueryAnswer(new String[]{"2"});
        assertEquals("no", queryAnswer.checkValuePresent(""));

    }

    @Test
    public void onePlaceHolder() {
        assertEquals("yes", queryAnswer.checkValuePresent("c*t"));
    }

    @Test
    public void onePlaceHolderLastPosition() {
        assertEquals("yes", queryAnswer.checkValuePresent("ca*"));
    }

    @Test
    public void twoPlaceHoldersLastPosition() {
        assertEquals("yes", queryAnswer.checkValuePresent("c**"));<commit_msg>test modified<commit_after>package org.xander.queryAnswer;

import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class QueryAnswerTest {
    String[] data = {"cat", "dog", "parrot"};
    private QueryAnswer queryAnswer;

    @Before
    public void setUp(){
        queryAnswer = new QueryAnswer(data);
    }

    @Test
    public void answerIfPresent() {
        String actualAnswer = queryAnswer.checkValuePresent("cat");
        assertEquals("yes", actualAnswer);
    }

    @Test
    public void answerIfNotPresent() {
        String actualAnswer = queryAnswer.checkValuePresent("elephant");
        assertEquals("no", actualAnswer);
    }

    @Test(expected = IllegalStateException.class)
    public void noAnswersPresent() {
        new QueryAnswer(new String[]{});
    }

    @Test(expected = IllegalArgumentException.class)
    public void questionNotCorrect() {
        QueryAnswer queryAnswer = new QueryAnswer(new String[]{"2"});
        queryAnswer.checkValuePresent(null);
    }

    @Test
    public void zeroLengthArgument() {
        QueryAnswer queryAnswer = new QueryAnswer(new String[]{"2"});
        assertEquals("no", queryAnswer.checkValuePresent(""));

    }

    @Test
    public void zeroLengthArgumentPresent() {
        QueryAnswer queryAnswer = new QueryAnswer(new String[]{""});
        assertEquals("yes", queryAnswer.checkValuePresent(""));
    }

    @Test
    public void emptySpaceArgument() {
        QueryAnswer queryAnswer = new QueryAnswer(new String[]{"   "});
        assertEquals("yes", queryAnswer.checkValuePresent("   "));
    }

    @Test
    public void onePlaceHolder() {
        assertEquals("yes", queryAnswer.checkValuePresent("c*t"));
    }

    @Test
    public void onePlaceHolderLastPosition() {
        assertEquals("yes", queryAnswer.checkValuePresent("ca*"));
    }

    @Test
    public void twoPlaceHoldersLastPosition() {
        assertEquals("yes", queryAnswer.checkValuePresent("c**"));
{'fraction_non_alphanumeric': 0.11947019867549669, 'fraction_numerical': 0.0010596026490066225, 'mean_word_length': 3.4686390532544378, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2272981', 'n_tokens_mistral': 1072, 'n_tokens_neox': 979, 'n_words': 219}