AccountManager: write user ID synchronously, keep it in memory. (#145)

* AccountManager: write user ID synchronously, keep it in memory.
* Unit tests: run AccountsManagerTest with Robolectric.
This commit is contained in:
Igor Tarasov
2020-01-15 12:36:25 +02:00
committed by GitHub
parent 7c9a8fc556
commit ef4c225290
2 changed files with 28 additions and 20 deletions

View File

@@ -4,6 +4,8 @@ import android.content.SharedPreferences;
import android.text.format.DateUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import static com.mapbox.mapboxsdk.constants.MapboxConstants.KEY_PREFERENCE_SKU_TOKEN;
import static org.junit.Assert.assertEquals;
@@ -13,6 +15,7 @@ import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@RunWith(RobolectricTestRunner.class)
public class AccountsManagerTest {
@Test
public void testIsExpired() {