use of com.android.tools.idea.gradle.dsl.model.repositories.JCenterDefaultRepositoryModel in project android by JetBrains.
the class BuildScriptModelTest method testParseRepositories.
public void testParseRepositories() throws IOException {
String text = "buildscript {\n" + " repositories {\n" + " jcenter()\n" + " }\n" + "}";
writeToBuildFile(text);
RepositoriesModel repositoriesModel = getGradleBuildModel().buildscript().repositories();
List<RepositoryModel> repositories = repositoriesModel.repositories();
assertThat(repositories).hasSize(1);
RepositoryModel repositoryModel = repositories.get(0);
assertTrue(repositoryModel instanceof JCenterDefaultRepositoryModel);
JCenterDefaultRepositoryModel repository = (JCenterDefaultRepositoryModel) repositoryModel;
assertEquals("name", "BintrayJCenter2", repository.name());
assertEquals("url", "https://jcenter.bintray.com/", repository.url());
}
Aggregations