Gradle Dependencies Check

Specification run results

View on GitHub

As a user I would like to map a Gradle DependencySet to a set of model using a custom mapper.

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

TestSubject:

Issues:

See:

Features


should map a gradle dependency set preserving the order

Result: PASS Time: 0.006 seconds

def dependencyA = Mock(Dependency)
def dependencyB = Mock(Dependency)
def dependencySet = Mock(DependencySet)
def set = testSubject.map(dependencySet)
            interaction {
                1 * dependencySet.stream() >> Stream.of(dependencyA, dependencyB)

                1 * dependencyA.getGroup() >> 'dependencyAGroup'
                1 * dependencyA.getName() >> 'dependencyAName'
                1 * dependencyA.getVersion() >> 'dependencyAVersion'

                1 * dependencyB.getGroup() >> 'dependencyBGroup'
                1 * dependencyB.getName() >> 'dependencyBName'
                1 * dependencyB.getVersion() >> 'dependencyBVersion'
            }
set.size() == 2
set[0] instanceof io.github.gregoranders.gradle.dependencies.tooling.model.api.Dependency
verifyDependency(set[0], 'dependencyAGroup', 'dependencyAName', 'dependencyAVersion')
set[1] instanceof io.github.gregoranders.gradle.dependencies.tooling.model.api.Dependency
verifyDependency(set[1], 'dependencyBGroup', 'dependencyBName', 'dependencyBVersion')
noExceptionThrown()