aboutsummaryrefslogtreecommitdiff
path: root/preinstrumented/src/test/java/org/robolectric/preinstrumented/JarInstrumentorTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'preinstrumented/src/test/java/org/robolectric/preinstrumented/JarInstrumentorTest.java')
-rw-r--r--preinstrumented/src/test/java/org/robolectric/preinstrumented/JarInstrumentorTest.java27
1 files changed, 3 insertions, 24 deletions
diff --git a/preinstrumented/src/test/java/org/robolectric/preinstrumented/JarInstrumentorTest.java b/preinstrumented/src/test/java/org/robolectric/preinstrumented/JarInstrumentorTest.java
index 6b6d169e1..3e401f37d 100644
--- a/preinstrumented/src/test/java/org/robolectric/preinstrumented/JarInstrumentorTest.java
+++ b/preinstrumented/src/test/java/org/robolectric/preinstrumented/JarInstrumentorTest.java
@@ -1,7 +1,6 @@
package org.robolectric.preinstrumented;
import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
@@ -23,8 +22,7 @@ public class JarInstrumentorTest {
JarInstrumentor dummyInstrumentor =
new JarInstrumentor() {
@Override
- protected void instrumentJar(
- File sourceJarFile, File destJarFile, File destNativesFile, boolean throwOnNatives) {
+ protected void instrumentJar(File sourceJarFile, File destJarFile) {
// No-op. We only want to test the command line processing. Stub the actual
// instrumention.
}
@@ -40,32 +38,13 @@ public class JarInstrumentorTest {
@Test
public void processCommandLine_legacyUsage() throws Exception {
spyDummyInstrumentor.processCommandLine(new String[] {"source.jar", "dest.jar"});
- verify(spyDummyInstrumentor)
- .instrumentJar(new File("source.jar"), new File("dest.jar"), null, false);
- }
-
- @Test
- public void processCommandLine_throwOnNatives() throws Exception {
- spyDummyInstrumentor.processCommandLine(
- new String[] {"source.jar", "dest.jar", "--throw-on-natives"});
- verify(spyDummyInstrumentor)
- .instrumentJar(new File("source.jar"), new File("dest.jar"), null, true);
- }
-
- @Test
- public void processCommandLine_writeNativesExemptionFile() throws Exception {
- spyDummyInstrumentor.processCommandLine(
- new String[] {"source.jar", "dest.jar", "--write-natives=natives.txt"});
- verify(spyDummyInstrumentor)
- .instrumentJar(
- new File("source.jar"), new File("dest.jar"), new File("natives.txt"), false);
+ verify(spyDummyInstrumentor).instrumentJar(new File("source.jar"), new File("dest.jar"));
}
@Test
public void processCommandLine_unknownArguments() throws Exception {
spyDummyInstrumentor.processCommandLine(new String[] {"source.jar", "dest.jar", "--some-flag"});
- verify(spyDummyInstrumentor, never())
- .instrumentJar(any(File.class), any(File.class), any(File.class), anyBoolean());
+ verify(spyDummyInstrumentor, never()).instrumentJar(any(File.class), any(File.class));
verify(spyDummyInstrumentor).exit(1);
}
}