use of org.robolectric.internal.dependency.DependencyResolver in project robolectric by robolectric.
the class LegacyDependencyResolverTest method whenRobolectricDepsPropertiesPropertyAndOfflineProperty.
@Test
public void whenRobolectricDepsPropertiesPropertyAndOfflineProperty() throws Exception {
Path depsPath = tempDirectory.createFile("deps.properties", "org.robolectric\\:android-all\\:" + VERSION + ": file-123.jar");
Path jarPath = tempDirectory.createFile("file-123.jar", "...");
properties.setProperty("robolectric-deps.properties", depsPath.toString());
properties.setProperty("robolectric.offline", "true");
DependencyResolver resolver = new LegacyDependencyResolver(properties, mockClassLoader);
URL jarUrl = resolver.getLocalArtifactUrl(DEPENDENCY_COORDS);
assertThat(Fs.fromUrl(jarUrl)).isEqualTo(jarPath);
}
Aggregations