Dependencies plugin
As a user I would like to be able inject a Plugin into a Gradle build to collect dependencies.
Total Runs | Success Rate | Failures | Errors | Skipped | Total time (ms) |
---|---|---|---|---|---|
1 | 100.0% | 0 | 0 | 0 | 0.060 seconds |
TestSubject:
Issues:
See:
- https://gradle.org
- https://docs.gradle.org/current/javadoc/org/gradle/api/Plugin.html
- https://docs.gradle.org/current/javadoc/org/gradle/tooling/provider/model/ToolingModelBuilderRegistry.html
- io.github.gregoranders.idea.gradle.dependencies.gradle.tooling.DependenciesPlugin
Features
should register plugin to registry
Result: PASS Time: 0.058 seconds
- Given a mocked registry
ToolingModelBuilderRegistry toolingModelBuilderRegistry = Mock()
- And a plugin using this registry
@Subject
DependenciesPlugin testSubject = new DependenciesPlugin(toolingModelBuilderRegistry)
- When the apply method is invoked on the plugin
testSubject.apply(_ as Project)
- Then the plugin should register a model builder to the registry
interaction {
1 * toolingModelBuilderRegistry.register(_) >> { ToolingModelBuilder builder -> builder instanceof DependenciesModelBuilder }
}
- And no exception should be thrown
noExceptionThrown()