Skip to content

Commit

Permalink
Added another test case to EclipseDependenciesCreatorTest
Browse files Browse the repository at this point in the history
Signed-off-by: Erhard Pointl <[email protected]>
  • Loading branch information
epeee authored and oehme committed Feb 4, 2018
1 parent ca2e6f7 commit 4756e68
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,23 @@ class EclipseDependenciesCreatorTest extends AbstractProjectBuilderSpec{
private final EclipseClasspath eclipseClasspath = new EclipseClasspath(project)
private final dependenciesProvider = new EclipseDependenciesCreator(eclipseClasspath)

def "compile dependency on child project"() {
applyPluginToProjects()
project.apply(plugin: 'java')
childProject.apply(plugin: 'java')

eclipseClasspath.setProjectDependenciesOnly(true)
eclipseClasspath.plusConfigurations = [project.configurations.compileClasspath, project.configurations.runtimeClasspath, project.configurations.testCompileClasspath, project.configurations.testRuntimeClasspath]

when:
project.dependencies.add('compile', childProject)
def result = dependenciesProvider.createDependencyEntries()

then:
result.size() == 1
result.findAll { it.kind == 'src' && it.path == '/child' }.size() == 1
}

def "testCompile dependency on current project (self-dependency)"() {
applyPluginToProjects()
project.apply(plugin: 'java')
Expand Down

0 comments on commit 4756e68

Please sign in to comment.