use of org.gradle.internal.component.local.model.DslOriginDependencyMetadata in project gradle by gradle.
the class ExternalModuleDependencyDescriptorFactoryTest method testAddWithNullGroupAndNullVersionShouldHaveEmptyStringModuleRevisionValues.
@Test
public void testAddWithNullGroupAndNullVersionShouldHaveEmptyStringModuleRevisionValues() {
ModuleDependency dependency = new DefaultExternalModuleDependency(null, "gradle-core", null, TEST_DEP_CONF);
DslOriginDependencyMetadata dependencyMetaData = externalModuleDependencyDescriptorFactory.createDependencyDescriptor(TEST_CONF, null, dependency);
assertThat(dependencyMetaData.getRequested().getGroup(), equalTo(""));
assertThat(dependencyMetaData.getRequested().getName(), equalTo("gradle-core"));
assertThat(dependencyMetaData.getRequested().getVersion(), equalTo(""));
}
use of org.gradle.internal.component.local.model.DslOriginDependencyMetadata in project gradle by gradle.
the class ExternalModuleDependencyDescriptorFactoryTest method testCreateFromModuleDependency.
@Test
public void testCreateFromModuleDependency() {
DefaultExternalModuleDependency moduleDependency = new DefaultExternalModuleDependency("org.gradle", "gradle-core", "1.0", TEST_DEP_CONF);
setUpDependency(moduleDependency);
DslOriginDependencyMetadata dependencyMetaData = externalModuleDependencyDescriptorFactory.createDependencyDescriptor(TEST_CONF, null, moduleDependency);
assertEquals(moduleDependency.isChanging(), dependencyMetaData.isChanging());
assertEquals(moduleDependency.isForce(), dependencyMetaData.isForce());
assertEquals(moduleDependency.getGroup(), dependencyMetaData.getRequested().getGroup());
assertEquals(moduleDependency.getName(), dependencyMetaData.getRequested().getName());
assertEquals(moduleDependency.getVersion(), dependencyMetaData.getRequested().getVersion());
assertDependencyDescriptorHasCommonFixtureValues(dependencyMetaData);
}
Aggregations