JetBrains IntelliJ Gradle Dependencies Plugin

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.020 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.005 seconds

def mock = Mock(org.gradle.api.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 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 0.005 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.003 seconds

def mock = Mock(org.gradle.api.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 Project
verifyProject(model, expectedGroup, expectedName, expectedDescription, expectedVersion, expectedPath)
noExceptionThrown()
group name description version path expectedGroup expectedName expectedDescription expectedVersion expectedPath    
projectGroup projectName null projectVersion projectPath projectGroup projectName   projectVersion projectPath 0.003 seconds (PASS)