JetBrains IntelliJ Gradle Dependencies Plugin

Specification run results

View on GitHub

Default mapper

As a user I would like to be able to map the gradle model into the application model to be able to differentiate between subprojects as dependencies an ‘external’ dependencies.

Total Runs Success Rate Failures Errors Skipped Total time (ms)
1 100.0% 0 0 0 0.022 seconds

TestSubject:

Issues:

See:

Features


should returned mapped model

Result: PASS Time: 0.019 seconds

Dependency subDependency = ImmutableDependency.of('subDependencyGroup', 'subDependencyName', 'subDependencyVersion')
Configuration subConfiguration = ImmutableConfiguration.of('subConfigurationName', Set.of(subDependency))
Project subProject = ImmutableProject.of('subProjectGroup', 'subProjectName', 'subProjectDescription', 'subProjectVersion', 'subProjectPath', Set.of(subConfiguration), Set.of())
Dependency dependencySub = ImmutableDependency.of('subProjectGroup', 'subProjectName', 'subProjectVersion')
Dependency dependencyOne = ImmutableDependency.of('subProjectGroup', 'subProjectName', 'dependencyVersion')
Dependency dependencyTwo = ImmutableDependency.of('subProjectGroup', 'dependencyName', 'dependencyVersion')
Dependency dependencyThree = ImmutableDependency.of('dependencyGroup', 'dependencyName', 'dependencyVersion')
Configuration configuration = ImmutableConfiguration.of('configurationName', new LinkedHashSet([dependencySub, dependencyOne, dependencyTwo, dependencyThree]))
Project project = ImmutableProject.of('projectGroup', 'projectName', null, 'projectVersion', 'projectPath', Set.of(configuration), Set.of(subProject))
def mappedProject = testSubject.map(project)
mappedProject.group() == 'projectGroup'
mappedProject.name() == 'projectName'
mappedProject.description() == ''
mappedProject.version() == 'projectVersion'
mappedProject.path() == 'projectPath'
mappedProject.subProjects().size() == 1
mappedProject.configurations().size() == 1
mappedProject.configurations()[0].name() == 'configurationName'
mappedProject.configurations().forEach(config -> {
    assert config.dependencies()[0].group() == 'subProjectGroup'
    assert config.dependencies()[0].name() == 'subProjectName'
    assert config.dependencies()[0].version() == 'subProjectVersion'
    assert config.dependencies()[0].isSubProject()
})
mappedProject.configurations().forEach(config -> {
    assert !config.dependencies()[1].isSubProject()
    assert !config.dependencies()[2].isSubProject()
    assert !config.dependencies()[3].isSubProject()
})
noExceptionThrown()