-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update InnerClassTest to test the generated InnerClassBuilder
- Loading branch information
1 parent
935e872
commit 1319aba
Showing
5 changed files
with
14 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 3 additions & 16 deletions
19
processor/src/test/java/com/hannesdorfmann/fragmentargs/processor/ProtectedAccessTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,17 @@ | ||
package com.hannesdorfmann.fragmentargs.processor; | ||
|
||
import com.google.testing.compile.JavaFileObjects; | ||
|
||
import org.junit.Test; | ||
|
||
import static com.google.common.truth.Truth.assert_; | ||
import static com.google.testing.compile.JavaSourceSubjectFactory.javaSource; | ||
import static com.hannesdorfmann.fragmentargs.processor.CompileTest.assertClassCompilesWithoutError; | ||
|
||
public class ProtectedAccessTest { | ||
@Test | ||
public void protectedField() { | ||
assert_().about(javaSource()) | ||
.that(JavaFileObjects.forResource("ClassWithProtectedField.java")) | ||
.processedWith(new ArgProcessor()) | ||
.compilesWithoutError() | ||
.and() | ||
.generatesSources(JavaFileObjects.forResource("ClassWithProtectedFieldBuilder.java")); | ||
assertClassCompilesWithoutError("ClassWithProtectedField.java", "ClassWithProtectedFieldBuilder.java"); | ||
} | ||
|
||
@Test | ||
public void protectedSetter() { | ||
assert_().about(javaSource()) | ||
.that(JavaFileObjects.forResource("ClassWithProtectedSetter.java")) | ||
.processedWith(new ArgProcessor()) | ||
.compilesWithoutError() | ||
.and() | ||
.generatesSources(JavaFileObjects.forResource("ClassWithProtectedSetterBuilder.java")); | ||
assertClassCompilesWithoutError("ClassWithProtectedSetter.java", "ClassWithProtectedSetterBuilder.java"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters