Android Open Source - sqlite-provider Content Provider Test

From Project

Back to project page sqlite-provider.


The source code is released under:

Apache License

If you think the Android project sqlite-provider listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package novoda.lib.sqliteprovider;
/*w  ww .j a  v  a 2s.  c  o  m*/
import android.database.Cursor;
import android.test.AndroidTestCase;

public class ContentProviderTest extends AndroidTestCase {

    public ContentProviderTest() {

    public void testMapping() throws Exception {
        Cursor cursor = getContext().getContentResolver().query(
                Uri.parse("content://novoda.lib.sqliteprovider.test/childs?expand=parents"), null,
                null, null, null);
        assertTrue(cursor.getColumnIndexOrThrow("childs__id") > -1);
        assertTrue(cursor.getColumnIndexOrThrow("parents_name") > -1);

Java Source Code List