Gradle Dependencies Check

Specification run results

View on GitHub

As a user I would like to map a Gradle dependency to a model using a custom mapper.

Total Runs Success Rate Failures Errors Skipped Total time (ms)
3 100.0% 0 0 0 0.020 seconds

TestSubject:

Issues:

See:

Features


should map a gradle dependency of { group: ‘dependencyGroup’ name: ‘dependencyName’ version: ‘dependencyVersion’ } to { group: ‘dependencyGroup’ name: ‘dependencyName’ version: ‘dependencyVersion’ }

Result: PASS Time: 0.007 seconds

def mock = Mock(Dependency)
def model = testSubject.map(mock)
interaction {
    1 * mock.getGroup() >> group
    1 * mock.getName() >> name
    1 * mock.getVersion() >> version
}
model instanceof io.github.gregoranders.gradle.dependencies.tooling.model.api.Dependency
verifyDependency(model, expectedGroup, expectedName, expectedVersion)
noExceptionThrown()
group             | name             | version             || expectedGroup     | expectedName     | expectedVersion
'dependencyGroup' | 'dependencyName' | 'dependencyVersion' || 'dependencyGroup' | 'dependencyName' | 'dependencyVersion'
null              | 'dependencyName' | 'dependencyVersion' || ''                | 'dependencyName' | 'dependencyVersion'
'dependencyGroup' | 'dependencyName' | null                || 'dependencyGroup' | 'dependencyName' | ''
group name version expectedGroup expectedName expectedVersion    
dependencyGroup dependencyName dependencyVersion dependencyGroup dependencyName dependencyVersion 0.007 seconds (PASS)

should map a gradle dependency of { group: ‘null’ name: ‘dependencyName’ version: ‘dependencyVersion’ } to { group: ‘’ name: ‘dependencyName’ version: ‘dependencyVersion’ }

Result: PASS Time: 0

def mock = Mock(Dependency)
def model = testSubject.map(mock)
interaction {
    1 * mock.getGroup() >> group
    1 * mock.getName() >> name
    1 * mock.getVersion() >> version
}
model instanceof io.github.gregoranders.gradle.dependencies.tooling.model.api.Dependency
verifyDependency(model, expectedGroup, expectedName, expectedVersion)
noExceptionThrown()
group             | name             | version             || expectedGroup     | expectedName     | expectedVersion
'dependencyGroup' | 'dependencyName' | 'dependencyVersion' || 'dependencyGroup' | 'dependencyName' | 'dependencyVersion'
null              | 'dependencyName' | 'dependencyVersion' || ''                | 'dependencyName' | 'dependencyVersion'
'dependencyGroup' | 'dependencyName' | null                || 'dependencyGroup' | 'dependencyName' | ''
group name version expectedGroup expectedName expectedVersion    
null dependencyName dependencyVersion   dependencyName dependencyVersion 0 (PASS)

should map a gradle dependency of { group: ‘dependencyGroup’ name: ‘dependencyName’ version: ‘null’ } to { group: ‘dependencyGroup’ name: ‘dependencyName’ version: ‘’ }

Result: PASS Time: 0

def mock = Mock(Dependency)
def model = testSubject.map(mock)
interaction {
    1 * mock.getGroup() >> group
    1 * mock.getName() >> name
    1 * mock.getVersion() >> version
}
model instanceof io.github.gregoranders.gradle.dependencies.tooling.model.api.Dependency
verifyDependency(model, expectedGroup, expectedName, expectedVersion)
noExceptionThrown()
group             | name             | version             || expectedGroup     | expectedName     | expectedVersion
'dependencyGroup' | 'dependencyName' | 'dependencyVersion' || 'dependencyGroup' | 'dependencyName' | 'dependencyVersion'
null              | 'dependencyName' | 'dependencyVersion' || ''                | 'dependencyName' | 'dependencyVersion'
'dependencyGroup' | 'dependencyName' | null                || 'dependencyGroup' | 'dependencyName' | ''
group name version expectedGroup expectedName expectedVersion    
dependencyGroup dependencyName null dependencyGroup dependencyName   0 (PASS)