Search in sources :

Example 1 with ClasspathEntryModel

use of org.jetbrains.plugins.gradle.model.ClasspathEntryModel in project intellij-community by JetBrains.

the class AbstractModelBuilderTest method assertBuildClasspath.

protected void assertBuildClasspath(String projectPath, String... classpath) {
    final Map<String, BuildScriptClasspathModel> classpathModelMap = getModulesMap(BuildScriptClasspathModel.class);
    final BuildScriptClasspathModel classpathModel = classpathModelMap.get(projectPath);
    assertNotNull(classpathModel);
    final List<? extends ClasspathEntryModel> classpathEntryModels = classpathModel.getClasspath().getAll();
    assertEquals(classpath.length, classpathEntryModels.size());
    for (int i = 0, length = classpath.length; i < length; i++) {
        String classpathEntry = classpath[i];
        final ClasspathEntryModel classpathEntryModel = classpathEntryModels.get(i);
        assertNotNull(classpathEntryModel);
        assertEquals(1, classpathEntryModel.getClasses().size());
        final String path = classpathEntryModel.getClasses().iterator().next();
        assertEquals(classpathEntry, new File(path).getName());
    }
}
Also used : BuildScriptClasspathModel(org.jetbrains.plugins.gradle.model.BuildScriptClasspathModel) File(java.io.File) ClasspathEntryModel(org.jetbrains.plugins.gradle.model.ClasspathEntryModel)

Aggregations

File (java.io.File)1 BuildScriptClasspathModel (org.jetbrains.plugins.gradle.model.BuildScriptClasspathModel)1 ClasspathEntryModel (org.jetbrains.plugins.gradle.model.ClasspathEntryModel)1