Search in sources :

Example 26 with TrayItem

use of net.grandcentrix.tray.core.TrayItem in project tray by grandcentrix.

the class TrayTest method testGetAll.

public void testGetAll() throws Exception {
    final TestTrayModulePreferences module2 = new TestTrayModulePreferences(getProviderMockContext(), "module2");
    mTrayModulePref.put("test", "test");
    module2.put("test", "test");
    mTrayModulePref.put("test2", "test");
    module2.put("test2", "test");
    assertUserDatabaseSize(4);
    final Collection<TrayItem> all = mTray.getAll();
    assertEquals(4, all.size());
}
Also used : TrayItem(net.grandcentrix.tray.core.TrayItem) TestTrayModulePreferences(net.grandcentrix.tray.mock.TestTrayModulePreferences)

Aggregations

TrayItem (net.grandcentrix.tray.core.TrayItem)26 Date (java.util.Date)5 Uri (android.net.Uri)3 ArrayList (java.util.ArrayList)3 NonNull (android.support.annotation.NonNull)2 TrayException (net.grandcentrix.tray.core.TrayException)2 SharedPreferences (android.content.SharedPreferences)1 Cursor (android.database.Cursor)1 MatrixCursor (android.database.MatrixCursor)1 HandlerThread (android.os.HandlerThread)1 Nullable (android.support.annotation.Nullable)1 MockContentProvider (android.test.mock.MockContentProvider)1 SimpleDateFormat (java.text.SimpleDateFormat)1 Collection (java.util.Collection)1 HashMap (java.util.HashMap)1 CountDownLatch (java.util.concurrent.CountDownLatch)1 OnTrayPreferenceChangeListener (net.grandcentrix.tray.core.OnTrayPreferenceChangeListener)1 TrayRuntimeException (net.grandcentrix.tray.core.TrayRuntimeException)1 WrongTypeException (net.grandcentrix.tray.core.WrongTypeException)1 TestTrayModulePreferences (net.grandcentrix.tray.mock.TestTrayModulePreferences)1