Skip to content

Commit

Permalink
Fix mocking static class
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyKirakosyan committed May 16, 2023
1 parent f4bd59c commit 8c1cc90
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,19 @@
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;
import static org.powermock.api.mockito.PowerMockito.mockStatic;
import static org.powermock.api.mockito.PowerMockito.verifyStatic;
import static org.powermock.api.mockito.PowerMockito.whenNew;

@PrepareForTest(NetworkStateHelper.class)
@PrepareForTest({NetworkStateHelper.class, AppCenterLog.class})
public class NetworkStateHelperTestFromLollipop extends AbstractNetworkStateHelperTest {

@Before
public void setUp() throws Exception {
TestUtils.setInternalState(Build.VERSION.class, "SDK_INT", Build.VERSION_CODES.LOLLIPOP);

/* Mock static classes. */
mockStatic(AppCenterLog.class);
}

@After
Expand Down

0 comments on commit 8c1cc90

Please sign in to comment.