Skip to content

Commit

Permalink
Static import CompilationSubject.assertThat
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWharton committed Apr 20, 2020
1 parent 622e07e commit 4135ccb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/test/java/com/squareup/javapoet/MethodSpecTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,14 @@
import javax.lang.model.util.Types;
import javax.tools.JavaFileObject;

import com.google.testing.compile.CompilationSubject;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;

import static com.google.common.collect.Iterables.getOnlyElement;
import static com.google.common.truth.Truth.assertThat;
import static com.google.testing.compile.CompilationSubject.assertThat;
import static com.google.testing.compile.Compiler.javac;
import static com.squareup.javapoet.MethodSpec.CONSTRUCTOR;
import static com.squareup.javapoet.TestUtil.findFirst;
import static javax.lang.model.util.ElementFilter.methodsIn;
import static org.junit.Assert.fail;
Expand Down Expand Up @@ -270,7 +269,7 @@ abstract static class AbstractClassWithPrivateAnnotation {
.build();
JavaFileObject jfo = JavaFile.builder(implClassName.packageName, type).build().toJavaFileObject();
Compilation compilation = javac().compile(jfo);
CompilationSubject.assertThat(compilation).succeeded();
assertThat(compilation).succeeded();
}

@Test public void equalsAndHashCode() {
Expand Down

0 comments on commit 4135ccb

Please sign in to comment.