-
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sascha Roth
committed
May 2, 2020
1 parent
00cdcff
commit b805a4c
Showing
3 changed files
with
46 additions
and
2 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
15 changes: 14 additions & 1 deletion
15
...onbypass/src/androidTest/java/org/chickenhook/restrictionbypass/ReflectionHelperTest.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,16 +1,29 @@ | ||
package org.chickenhook.restrictionbypass; | ||
|
||
import org.chickenhook.restrictionbypass.helpers.Reflection; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertNull; | ||
import static org.junit.Assert.assertSame; | ||
|
||
public class ReflectionHelperTest { | ||
|
||
Object reflectiveField = new Object(); | ||
Object reflectiveField; | ||
|
||
@Before | ||
public void setUp() { | ||
reflectiveField = new Object(); | ||
} | ||
|
||
@Test | ||
public void getReflective() throws Exception { | ||
assertSame(Reflection.getReflective(this, "reflectiveField"), reflectiveField); | ||
} | ||
|
||
@Test | ||
public void setReflective() throws Exception { | ||
Reflection.setReflective(this, "reflectiveField", null); | ||
assertNull(reflectiveField); | ||
} | ||
} |
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