Code example for MockContentResolver

Methods: insert

0
            activePlayer = next.name;
            ContentValues cv = new ContentValues();
            cv.put("sender", sender.name);
            cv.put("next", next.name);
            cv.put("msg", msg);
            mRes.insert(Uri.parse("content://foo.lounge/matches/"+guid+"/msges"), cv);
        } 
    } 
     
    public void testGamesLobbyAPI() { 
        // crash test dummy games 
        mRes.insert(Uri.parse("content://foo.lounge/games"), wrms.toContenValues());
        mRes.insert(Uri.parse("content://foo.lounge/games"), panda.toContenValues());
        mRes.insert(Uri.parse("content://foo.lounge/games"), molecul.toContenValues());
        mRes.insert(Uri.parse("content://foo.lounge/games"), gravty.toContenValues());
        // crash test dummy players 
        mRes.insert(Uri.parse("content://foo.lounge/players"), anyName.toContenValues());
        mRes.insert(Uri.parse("content://foo.lounge/players"), ananDa.toContenValues());
        mRes.insert(Uri.parse("content://foo.lounge/players"), lukas.toContenValues());