use of com.google.idea.blaze.base.command.buildresult.SourceArtifact in project intellij by bazelbuild.
the class EmptyLibraryFilterTest method isEmpty_largeAndNonEmpty.
@Test
public void isEmpty_largeAndNonEmpty() throws IOException {
File jar = JarBuilder.newEmptyJar(tempDirectory).addManifest().addDirectory("dir1").addDirectory("dir2").addFile("com/google/example/A.java", "package com.google.example; public class A {}").addFile("com/google/example/B.java", "package com.google.example; public class B {}").addFile("com/google/example/C.java", "package com.google.example; public class C {}").build();
assertThat(EmptyLibraryFilter.isEmpty(new SourceArtifact(jar))).isFalse();
}
use of com.google.idea.blaze.base.command.buildresult.SourceArtifact in project intellij by bazelbuild.
the class EmptyLibraryFilterTest method isEmpty_nonexistent.
@Test
public void isEmpty_nonexistent() throws IOException {
File jar = new File("nonexistent.jar");
assertThat(EmptyLibraryFilter.isEmpty(new SourceArtifact(jar))).isTrue();
}
use of com.google.idea.blaze.base.command.buildresult.SourceArtifact in project intellij by bazelbuild.
the class EmptyLibraryFilterTest method isEmpty_largeButManifestOnly.
@Test
public void isEmpty_largeButManifestOnly() throws IOException {
File jar = JarBuilder.newEmptyJar(tempDirectory).addManifest().bloatBy(200).build();
assertThat(EmptyLibraryFilter.isEmpty(new SourceArtifact(jar))).isTrue();
}
use of com.google.idea.blaze.base.command.buildresult.SourceArtifact in project intellij by bazelbuild.
the class EmptyLibraryFilterTest method isEmpty_trulyEmpty.
@Test
public void isEmpty_trulyEmpty() throws IOException {
File jar = JarBuilder.newEmptyJar(tempDirectory).build();
assertThat(EmptyLibraryFilter.isEmpty(new SourceArtifact(jar))).isTrue();
}
use of com.google.idea.blaze.base.command.buildresult.SourceArtifact in project intellij by bazelbuild.
the class EmptyLibraryFilterTest method isEmpty_smallButNonEmpty.
@Test
public void isEmpty_smallButNonEmpty() throws IOException {
File jar = JarBuilder.newEmptyJar(tempDirectory).addManifest().addFile("com/google/example/A.java", "package com.google.example; class A {}").build();
assertThat(EmptyLibraryFilter.isEmpty(new SourceArtifact(jar))).isFalse();
}
Aggregations