<commit_before><commit_msg>Add basic test for ModuleIvyProjectHelper<commit_after>package org.apache.easyant.core.ant;

import java.io.File;
import java.net.URISyntaxException;

import org.apache.easyant.core.EasyAntMagicNames;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.ProjectHelper;
import org.apache.tools.ant.ProjectHelperRepository;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

public class ModuleIvyProjectHelperTest {
    @Before
    public void setUp() {
        // ProjectHelperRepository.getInstance().registerProjectHelper("org.apache.easyant.core.ant.EasyAntProjectHelper");

        ProjectHelperRepository.getInstance().registerProjectHelper(
                "org.apache.easyant.core.ant.ModuleIvyProjectHelper");
    }

    @Test
    public void shouldHandleModuleIvyFile() throws URISyntaxException {
        File f = new File(this.getClass().getResource("../standardJavaProject.ivy").toURI());
        Project p = new Project();
        p.setNewProperty(EasyAntMagicNames.IGNORE_USER_IVYSETTINGS, "true");
        p.setNewProperty(EasyAntMagicNames.GLOBAL_EASYANT_IVYSETTINGS,
                this.getClass().getResource("/ivysettings-test.xml").toString());
        ProjectHelper.configureProject(p, f);
        Assert.assertNotNull(p.getTargets().get("clean"));
    }
}
{'fraction_non_alphanumeric': 0.11641791044776119, 'fraction_numerical': 0.0, 'mean_word_length': 4.23828125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, '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': '5833677', 'n_tokens_mistral': 401, 'n_tokens_neox': 388, 'n_words': 55}