Gradle Dependencies Check

Specification run results

View on GitHub

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

Total Runs Success Rate Failures Errors Skipped Total time (ms)
2 100.0% 0 0 0 0.018 seconds

TestSubject:

Issues:

See:

Features


should map a gradle project of { group: ‘projectGroup’ name: ‘projectName’ description: projectDescription version: ‘projectVersion’ path: projectPath } to { group: ‘projectGroup’ name: ‘projectName’ description: ‘projectDescription’ version: ‘projectVersion’ path ‘projectPath’}

Result: PASS Time: 0.007 seconds

def mock = Mock(Project)
def model = testSubject.map(mock)
interaction {
    1 * mock.getGroup() >> group
    1 * mock.getName() >> name
    1 * mock.getDescription() >> description
    1 * mock.getVersion() >> version
    1 * mock.getPath() >> path
    1 * mock.getConfigurations() >> {
        def mockedContainerConfiguration = Mock(ConfigurationContainer)
        1 * mockedContainerConfiguration.stream() >> Stream.empty()
        mockedContainerConfiguration
    }
    1 * mock.getSubprojects() >> Set.of()
}
model instanceof io.github.gregoranders.gradle.dependencies.tooling.model.api.Project
verifyProject(model, expectedGroup, expectedName, expectedDescription, expectedVersion, expectedPath)
noExceptionThrown()
group          | name          | description          | version          | path          || expectedGroup  | expectedName  | expectedDescription  | expectedVersion  | expectedPath
'projectGroup' | 'projectName' | 'projectDescription' | 'projectVersion' | 'projectPath' || 'projectGroup' | 'projectName' | 'projectDescription' | 'projectVersion' | 'projectPath'
'projectGroup' | 'projectName' | null                 | 'projectVersion' | 'projectPath' || 'projectGroup' | 'projectName' | ''                   | 'projectVersion' | 'projectPath'
group name description version path expectedGroup expectedName expectedDescription expectedVersion expectedPath    
projectGroup projectName projectDescription projectVersion projectPath projectGroup projectName projectDescription projectVersion projectPath 0.007 seconds (PASS)

should map a gradle project of { group: ‘projectGroup’ name: ‘projectName’ description: null version: ‘projectVersion’ path: projectPath } to { group: ‘projectGroup’ name: ‘projectName’ description: ‘’ version: ‘projectVersion’ path ‘projectPath’}

Result: PASS Time: 0.001 seconds

def mock = Mock(Project)
def model = testSubject.map(mock)
interaction {
    1 * mock.getGroup() >> group
    1 * mock.getName() >> name
    1 * mock.getDescription() >> description
    1 * mock.getVersion() >> version
    1 * mock.getPath() >> path
    1 * mock.getConfigurations() >> {
        def mockedContainerConfiguration = Mock(ConfigurationContainer)
        1 * mockedContainerConfiguration.stream() >> Stream.empty()
        mockedContainerConfiguration
    }
    1 * mock.getSubprojects() >> Set.of()
}
model instanceof io.github.gregoranders.gradle.dependencies.tooling.model.api.Project
verifyProject(model, expectedGroup, expectedName, expectedDescription, expectedVersion, expectedPath)
noExceptionThrown()
group          | name          | description          | version          | path          || expectedGroup  | expectedName  | expectedDescription  | expectedVersion  | expectedPath
'projectGroup' | 'projectName' | 'projectDescription' | 'projectVersion' | 'projectPath' || 'projectGroup' | 'projectName' | 'projectDescription' | 'projectVersion' | 'projectPath'
'projectGroup' | 'projectName' | null                 | 'projectVersion' | 'projectPath' || 'projectGroup' | 'projectName' | ''                   | 'projectVersion' | 'projectPath'
group name description version path expectedGroup expectedName expectedDescription expectedVersion expectedPath    
projectGroup projectName null projectVersion projectPath projectGroup projectName   projectVersion projectPath 0.001 seconds (PASS)