<commit_before>package store.client.command;

import static java.util.Arrays.asList;
import java.util.List;
import static org.fest.assertions.api.Assertions.assertThat;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

/**
 * Unit tests.
 */
public class CommandTest {

    /**
     * Data provider.
     *
     * @return Test data.
     */
    @DataProvider(name = "paramsDataProvider")
    public Object[][] paramsDataProvider() {
        return new Object[][]{
            {new Quit(), asList(), asList()},
            {new Quit(), asList("quit", "test"), asList("test")},
            {new Quit(), asList("quit", "one", "two"), asList("one", "two")},
            {new Get(), asList("get", "9d0a68c215bfcdc69b2a"), asList("9d0a68c215bfcdc69b2a")},
            {new Drop(), asList("drop", "repository", "primary"), asList("repository", "primary")},
            {new AddRemote(), asList("add"), asList()},
            {new AddRemote(), asList("add", "remote"), asList()},
            {new AddRemote(), asList("add", "remote", "http://localhost:9400"), asList("http://localhost:9400")}
        };
    }

    /**
     * Test.
     *
     * @param command Command to test.
     * @param argList Command line arguments list to test.
     * @param params Expected parameters list.
     */
    @Test(dataProvider = "paramsDataProvider")
    void paramsTest(Command command, List<String> argList, List<String> params) {
        assertThat(command.params(argList)).as(command.name() + ", " + argList).isEqualTo(params);
    }

    /**
     * Data provider.
     *
     * @return Test data.
     */
    @DataProvider(name = "isValidDataProvider")
    public Object[][] isValidDataProvider() {
        return new Object[][]{
            {new Quit(), asList()},
            {new Get(), asList("9d0a68c215bfcdc69b2a0f4852ef5d7aa6aa047e")},
            {new Drop(), asList("repository", "primary")}
        };
    }

    /**
     * Test.
     *
     * @param command Command to test.
     * @param params Expected valid parameters list.
     */
    @Test(dataProvider = "isValidDataProvider")
    void isValidTest(Command command, List<String> params) {
        assertThat(command.isValid(params)).as(command.name() + ", " + params).isTrue();
    }

    /**
     * Data provider.
     *
     * @return Test data.
     */
    @DataProvider(name = "isInvalidDataProvider")
    public Object[][] isInvalidDataProvider() {
        return new Object[][]{
            {new Quit(), asList("repository")},
            {new Get(), asList("repository", "9d0a68c215bfcdc69b2a0f4852ef5d7aa6aa047e")},
            {new Drop(), asList("primary")}
        };
    }

    /**
     * Test.
     *
     * @param command Command to test.
     * @param params Expected invalid parameters list.
     */
    @Test(dataProvider = "isInvalidDataProvider")
    void isInvalidTest(Command command, List<String> params) {
        assertThat(command.isValid(params)).as(command.name() + ", " + params).isFalse();
    }
}<commit_msg>Correction des tests suite à la suppression de la commande Drop.<commit_after>package store.client.command;

import static java.util.Arrays.asList;
import java.util.List;
import static org.fest.assertions.api.Assertions.assertThat;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

/**
 * Unit tests.
 */
public class CommandTest {

    /**
     * Data provider.
     *
     * @return Test data.
     */
    @DataProvider(name = "paramsDataProvider")
    public Object[][] paramsDataProvider() {
        return new Object[][]{
            {new Quit(), asList(), asList()},
            {new Quit(), asList("quit", "test"), asList("test")},
            {new Quit(), asList("quit", "one", "two"), asList("one", "two")},
            {new Get(), asList("get", "9d0a68c215bfcdc69b2a"), asList("9d0a68c215bfcdc69b2a")},
            {new AddRemote(), asList("add"), asList()},
            {new AddRemote(), asList("add", "remote"), asList()},
            {new AddRemote(), asList("add", "remote", "http://localhost:9400"), asList("http://localhost:9400")}
        };
    }

    /**
     * Test.
     *
     * @param command Command to test.
     * @param argList Command line arguments list to test.
     * @param params Expected parameters list.
     */
    @Test(dataProvider = "paramsDataProvider")
    void paramsTest(Command command, List<String> argList, List<String> params) {
        assertThat(command.params(argList)).as(command.name() + ", " + argList).isEqualTo(params);
    }

    /**
     * Data provider.
     *
     * @return Test data.
     */
    @DataProvider(name = "isValidDataProvider")
    public Object[][] isValidDataProvider() {
        return new Object[][]{
            {new Quit(), asList()},
            {new Get(), asList("9d0a68c215bfcdc69b2a0f4852ef5d7aa6aa047e")},
            {new DropRepository(), asList("primary")}
        };
    }

    /**
     * Test.
     *
     * @param command Command to test.
     * @param params Expected valid parameters list.
     */
    @Test(dataProvider = "isValidDataProvider")
    void isValidTest(Command command, List<String> params) {
        assertThat(command.isValid(params)).as(command.name() + ", " + params).isTrue();
    }

    /**
     * Data provider.
     *
     * @return Test data.
     */
    @DataProvider(name = "isInvalidDataProvider")
    public Object[][] isInvalidDataProvider() {
        return new Object[][]{
            {new Quit(), asList("repository")},
            {new Get(), asList("repository", "9d0a68c215bfcdc69b2a0f4852ef5d7aa6aa047e")},
            {new DropRepository(), asList("repository", "primary")}
        };
    }

    /**
     * Test.
     *
     * @param command Command to test.
     * @param params Expected invalid parameters list.
     */
    @Test(dataProvider = "isInvalidDataProvider")
    void isInvalidTest(Command command, List<String> params) {
        assertThat(command.isValid(params)).as(command.name() + ", " + params).isFalse();
    }
}
{'fraction_non_alphanumeric': 0.1601530018293697, 'fraction_numerical': 0.023282887077997673, 'mean_word_length': 2.7054836722119533, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '532227', 'n_tokens_mistral': 1898, 'n_tokens_neox': 1839, 'n_words': 389}