Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Commit 89f9dff

Browse files
committed
Add mocked AndroidAnnotationsEnvironment
1 parent 4b21a73 commit 89f9dff

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎AndroidAnnotations/androidannotations-core/androidannotations/src/test/java/org/androidannotations/internal/helper/AndroidManifestFinderTest.java‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@
2626
import java.util.Arrays;
2727
import java.util.Objects;
2828

29+
import org.androidannotations.AndroidAnnotationsEnvironment;
2930
import org.junit.Test;
3031
import org.junit.runner.RunWith;
3132
import org.junit.runners.Parameterized;
33+
import org.mockito.Mockito;
3234

3335
@RunWith(Parameterized.class)
3436
public class AndroidManifestFinderTest {
@@ -158,7 +160,10 @@ public static Iterable<Object[]> createTestData() {
158160

159161
@Test
160162
public void testFindManifestInKnownPathsStartingFromGenFolder() throws IOException {
161-
AndroidManifestFinder finder = new AndroidManifestFinder(null);
163+
AndroidAnnotationsEnvironment mockEnvironment = Mockito.mock(AndroidAnnotationsEnvironment.class);
164+
Mockito.when(mockEnvironment.getOptionBooleanValue(AndroidManifestFinder.OPTION_INSTANT_FEATURE)).thenReturn(false);
165+
166+
AndroidManifestFinder finder = new AndroidManifestFinder(mockEnvironment);
162167
tempDirectory = Files.createTempDirectory("AA");
163168

164169
File genFolder = createGenFolder(genFolderPath);

0 commit comments

Comments
 (0)