List of usage examples for android.util ArrayMap isEmpty
@Override public boolean isEmpty()
From source file:com.android.tests.lib.UnitTest.java
@Test public void exceptions() { try {//from w w w . j av a 2 s . c o m ArrayMap map = new ArrayMap(); map.isEmpty(); fail(); } catch (RuntimeException e) { assertEquals(RuntimeException.class, e.getClass()); assertTrue(e.getMessage().contains("isEmpty")); assertTrue(e.getMessage().contains("not mocked")); assertTrue(e.getMessage().contains("androidstudio/not-mocked")); } try { Debug.getThreadAllocCount(); fail(); } catch (RuntimeException e) { assertEquals(RuntimeException.class, e.getClass()); assertTrue(e.getMessage().contains("getThreadAllocCount")); assertTrue(e.getMessage().contains("not mocked")); assertTrue(e.getMessage().contains("androidstudio/not-mocked")); } }
From source file:com.android.tests.lib.LibUnitTest.java
@Test public void exceptions() { try {// www . ja va2s . c o m ArrayMap map = new ArrayMap(); map.isEmpty(); fail(); } catch (RuntimeException e) { assertEquals(RuntimeException.class, e.getClass()); assertTrue(e.getMessage().contains("isEmpty")); assertTrue(e.getMessage().contains("not mocked")); } try { Debug.getThreadAllocCount(); fail(); } catch (RuntimeException e) { assertEquals(RuntimeException.class, e.getClass()); assertTrue(e.getMessage().contains("getThreadAllocCount")); assertTrue(e.getMessage().contains("not mocked")); } }