use of com.google.devtools.intellij.IntellijAspectTestFixtureOuterClass.IntellijAspectTestFixture in project intellij by bazelbuild.
the class FilteredGenJarTest method testFilteredGenJar.
@Test
public void testFilteredGenJar() throws Exception {
IntellijAspectTestFixture testFixture = loadTestFixture(":mixed_fixture");
TargetIdeInfo targetIdeInfo = findTarget(testFixture, ":mixed");
assertThat(targetIdeInfo.getJavaIdeInfo().hasFilteredGenJar()).isTrue();
assertThat(targetIdeInfo.getJavaIdeInfo().getFilteredGenJar().getJar().getRelativePath()).isEqualTo(testRelative("mixed-filtered-gen.jar"));
assertThat(targetIdeInfo.getJavaIdeInfo().getFilteredGenJar().getSourceJar().getRelativePath()).isEqualTo(testRelative("mixed-filtered-gen-src.jar"));
}
use of com.google.devtools.intellij.IntellijAspectTestFixtureOuterClass.IntellijAspectTestFixture in project intellij by bazelbuild.
the class GenJarsTest method testFilteredGenJarNotCreatedForSourceOnlyRule.
@Test
public void testFilteredGenJarNotCreatedForSourceOnlyRule() throws Exception {
IntellijAspectTestFixture testFixture = loadTestFixture(":no_plugin_fixture");
TargetIdeInfo targetIdeInfo = findTarget(testFixture, ":no_plugin");
assertThat(targetIdeInfo.getJavaIdeInfo().getGeneratedJarsList()).isEmpty();
}
use of com.google.devtools.intellij.IntellijAspectTestFixtureOuterClass.IntellijAspectTestFixture in project intellij by bazelbuild.
the class GenJarsTest method testJavaLibraryWithGeneratedSourcesHasGenJars.
@Test
public void testJavaLibraryWithGeneratedSourcesHasGenJars() throws Exception {
IntellijAspectTestFixture testFixture = loadTestFixture(":has_plugin_fixture");
TargetIdeInfo targetIdeInfo = findTarget(testFixture, ":has_plugin");
assertThat(targetIdeInfo.getJavaIdeInfo().getGeneratedJarsList().stream().map(IntellijAspectTest::libraryArtifactToString).collect(toList())).containsExactly(jarString(testRelative("libhas_plugin-gen.jar"), null, testRelative("libhas_plugin-gensrc.jar")));
assertThat(getOutputGroupFiles(testFixture, "intellij-info-java")).containsAllOf(testRelative("has_plugin.java-manifest"), testRelative("has_plugin.intellij-info.txt"));
assertThat(getOutputGroupFiles(testFixture, "intellij-resolve-java")).containsAllOf(testRelative("libhas_plugin-gen.jar"), testRelative("libhas_plugin-gensrc.jar"));
assertThat(getOutputGroupFiles(testFixture, "intellij-compile-java")).containsAllOf(testRelative("libhas_plugin.jar"), testRelative("libhas_plugin-gen.jar"));
assertThat(getOutputGroupFiles(testFixture, "intellij-info-generic")).isEmpty();
}
use of com.google.devtools.intellij.IntellijAspectTestFixtureOuterClass.IntellijAspectTestFixture in project intellij by bazelbuild.
the class DependenciesTest method testJavaLibraryWithDiamondDependencies.
@Test
public void testJavaLibraryWithDiamondDependencies() throws Exception {
IntellijAspectTestFixture testFixture = loadTestFixture(":diamond_dep_fixture");
TargetIdeInfo target = findTarget(testFixture, ":diamond_dep");
assertThat(dependenciesForTarget(target)).containsAllOf(dep(":single_dep"), dep(":single_dep_sibling"));
}
use of com.google.devtools.intellij.IntellijAspectTestFixtureOuterClass.IntellijAspectTestFixture in project intellij by bazelbuild.
the class DependenciesTest method testJavaLibraryWithTransitiveDependencies.
@Test
public void testJavaLibraryWithTransitiveDependencies() throws Exception {
IntellijAspectTestFixture testFixture = loadTestFixture(":transitive_dep_fixture");
TargetIdeInfo target = findTarget(testFixture, ":transitive_dep");
assertThat(dependenciesForTarget(target)).contains(dep(":single_dep"));
assertThat(getOutputGroupFiles(testFixture, "intellij-info-java")).containsAllOf(testRelative("foo.java-manifest"), testRelative("foo.intellij-info.txt"), testRelative("single_dep.java-manifest"), testRelative("single_dep.intellij-info.txt"), testRelative("transitive_dep.java-manifest"), testRelative("transitive_dep.intellij-info.txt"));
assertThat(getOutputGroupFiles(testFixture, "intellij-resolve-java")).containsExactly(testRelative("libfoo.jar"), testRelative("libfoo-hjar.jar"), testRelative("libfoo-src.jar"), testRelative("libsingle_dep.jar"), testRelative("libsingle_dep-hjar.jar"), testRelative("libsingle_dep-src.jar"), testRelative("libtransitive_dep.jar"), testRelative("libtransitive_dep-hjar.jar"), testRelative("libtransitive_dep-src.jar"));
assertThat(getOutputGroupFiles(testFixture, "intellij-compile-java")).containsExactly(testRelative("libfoo.jar"), testRelative("libsingle_dep.jar"), testRelative("libtransitive_dep.jar"));
assertThat(getOutputGroupFiles(testFixture, "intellij-info-generic")).isEmpty();
}
Aggregations