mirror of
https://github.com/nextcloud/android.git
synced 2024-11-28 18:28:59 +03:00
Merge pull request #6927 from nextcloud/fixMockito
do not use internal FieldSetter
This commit is contained in:
commit
706b47f3f5
1 changed files with 2 additions and 3 deletions
|
@ -28,7 +28,6 @@ import org.junit.Test;
|
||||||
import org.mockito.Mock;
|
import org.mockito.Mock;
|
||||||
import org.mockito.Mockito;
|
import org.mockito.Mockito;
|
||||||
import org.mockito.MockitoAnnotations;
|
import org.mockito.MockitoAnnotations;
|
||||||
import org.mockito.internal.util.reflection.FieldSetter;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@ -39,10 +38,10 @@ public final class ActivityListAdapterTest {
|
||||||
private ActivityListAdapter activityListAdapter;
|
private ActivityListAdapter activityListAdapter;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws NoSuchFieldException {
|
public void setUp() {
|
||||||
MockitoAnnotations.initMocks(this);
|
MockitoAnnotations.initMocks(this);
|
||||||
MockitoAnnotations.initMocks(activityListAdapter);
|
MockitoAnnotations.initMocks(activityListAdapter);
|
||||||
FieldSetter.setField(activityListAdapter, activityListAdapter.getClass().getDeclaredField("values"), new ArrayList<>());
|
activityListAdapter.values = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in a new issue