|
@@ -11,6 +11,8 @@ import org.assertj.android.api.Assertions;
|
11
|
11
|
import org.junit.Test;
|
12
|
12
|
import org.robolectric.Shadows;
|
13
|
13
|
|
|
14
|
+import java.lang.reflect.Field;
|
|
15
|
+
|
14
|
16
|
import static org.assertj.core.api.Java6Assertions.assertThat;
|
15
|
17
|
import static org.mockito.Mockito.mock;
|
16
|
18
|
import static org.mockito.Mockito.spy;
|
|
@@ -150,6 +152,10 @@ public class ViewControllerTest extends BaseTest {
|
150
|
152
|
view.getViewTreeObserver().dispatchOnGlobalLayout();
|
151
|
153
|
verify(spy, times(0)).onAppear();
|
152
|
154
|
verify(spy, times(0)).onDisappear();
|
|
155
|
+
|
|
156
|
+ Field field = ViewController.class.getDeclaredField("view");
|
|
157
|
+ field.setAccessible(true);
|
|
158
|
+ assertThat(field.get(spy)).isNull();
|
153
|
159
|
}
|
154
|
160
|
|
155
|
161
|
@Test
|