Search in sources :

Example 31 with IntellijAspectTestFixture

use of com.google.devtools.intellij.IntellijAspectTestFixtureOuterClass.IntellijAspectTestFixture in project intellij by bazelbuild.

the class TagTest method testTags.

@Test
public void testTags() throws Exception {
    IntellijAspectTestFixture testFixture = loadTestFixture(":tags_fixture");
    TargetIdeInfo targetIdeInfo = findTarget(testFixture, ":foo");
    assertThat(targetIdeInfo.getTagsList()).containsExactly("a", "b", "c", "d");
}
Also used : TargetIdeInfo(com.google.devtools.intellij.ideinfo.IntellijIdeInfo.TargetIdeInfo) IntellijAspectTestFixture(com.google.devtools.intellij.IntellijAspectTestFixtureOuterClass.IntellijAspectTestFixture) Test(org.junit.Test) BazelIntellijAspectTest(com.google.idea.blaze.BazelIntellijAspectTest)

Example 32 with IntellijAspectTestFixture

use of com.google.devtools.intellij.IntellijAspectTestFixtureOuterClass.IntellijAspectTestFixture in project intellij by bazelbuild.

the class DependenciesTest method testRuntimeDeps.

@Test
public void testRuntimeDeps() throws Exception {
    IntellijAspectTestFixture testFixture = loadTestFixture(":runtime_dep_lib_fixture");
    // Make sure we propagated to foo
    TargetIdeInfo foo = findTarget(testFixture, ":foo");
    assertThat(foo).isNotNull();
    // Make sure foo is added to runtime_deps
    TargetIdeInfo lib = findTarget(testFixture, ":runtime_dep_lib");
    assertThat(dependenciesForTarget(lib)).contains(runtimeDep(":foo"));
}
Also used : TargetIdeInfo(com.google.devtools.intellij.ideinfo.IntellijIdeInfo.TargetIdeInfo) IntellijAspectTestFixture(com.google.devtools.intellij.IntellijAspectTestFixtureOuterClass.IntellijAspectTestFixture) Test(org.junit.Test) BazelIntellijAspectTest(com.google.idea.blaze.BazelIntellijAspectTest)

Example 33 with IntellijAspectTestFixture

use of com.google.devtools.intellij.IntellijAspectTestFixtureOuterClass.IntellijAspectTestFixture in project intellij by bazelbuild.

the class FilteredGenJarTest method testFilteredGenJarNotCreatedForSourceOnlyRule.

@Test
public void testFilteredGenJarNotCreatedForSourceOnlyRule() throws Exception {
    IntellijAspectTestFixture testFixture = loadTestFixture(":source_only_fixture");
    TargetIdeInfo targetIdeInfo = findTarget(testFixture, ":source_only");
    assertThat(targetIdeInfo.getJavaIdeInfo().hasFilteredGenJar()).isFalse();
}
Also used : TargetIdeInfo(com.google.devtools.intellij.ideinfo.IntellijIdeInfo.TargetIdeInfo) IntellijAspectTestFixture(com.google.devtools.intellij.IntellijAspectTestFixtureOuterClass.IntellijAspectTestFixture) Test(org.junit.Test) BazelIntellijAspectTest(com.google.idea.blaze.BazelIntellijAspectTest)

Example 34 with IntellijAspectTestFixture

use of com.google.devtools.intellij.IntellijAspectTestFixtureOuterClass.IntellijAspectTestFixture in project intellij by bazelbuild.

the class FilteredGenJarTest method testFilteredGenJarNotCreatedForOnlyGenRule.

@Test
public void testFilteredGenJarNotCreatedForOnlyGenRule() throws Exception {
    IntellijAspectTestFixture testFixture = loadTestFixture(":gen_only_fixture");
    TargetIdeInfo targetIdeInfo = findTarget(testFixture, ":gen_only");
    assertThat(targetIdeInfo.getJavaIdeInfo().hasFilteredGenJar()).isFalse();
}
Also used : TargetIdeInfo(com.google.devtools.intellij.ideinfo.IntellijIdeInfo.TargetIdeInfo) IntellijAspectTestFixture(com.google.devtools.intellij.IntellijAspectTestFixtureOuterClass.IntellijAspectTestFixture) Test(org.junit.Test) BazelIntellijAspectTest(com.google.idea.blaze.BazelIntellijAspectTest)

Aggregations

IntellijAspectTestFixture (com.google.devtools.intellij.IntellijAspectTestFixtureOuterClass.IntellijAspectTestFixture)34 BazelIntellijAspectTest (com.google.idea.blaze.BazelIntellijAspectTest)33 Test (org.junit.Test)33 TargetIdeInfo (com.google.devtools.intellij.ideinfo.IntellijIdeInfo.TargetIdeInfo)32 IntellijAspectTest (com.google.idea.blaze.aspect.IntellijAspectTest)11 CIdeInfo (com.google.devtools.intellij.ideinfo.IntellijIdeInfo.CIdeInfo)5 Iterables (com.google.common.collect.Iterables)1 Truth.assertThat (com.google.common.truth.Truth.assertThat)1 CToolchainIdeInfo (com.google.devtools.intellij.ideinfo.IntellijIdeInfo.CToolchainIdeInfo)1 Dependency (com.google.devtools.intellij.ideinfo.IntellijIdeInfo.Dependency)1 FileOutputStream (java.io.FileOutputStream)1 IOException (java.io.IOException)1 OutputStream (java.io.OutputStream)1 List (java.util.List)1 Objects (java.util.Objects)1 Collectors (java.util.stream.Collectors)1 Collectors.toList (java.util.stream.Collectors.toList)1 RunWith (org.junit.runner.RunWith)1 JUnit4 (org.junit.runners.JUnit4)1