@@ -0,0 +1,2659 @@
+package com.battlelancer.seriesguide.provider;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertNotNull;%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport android.content.ContentProviderOperation;%0Aimport android.database.Cursor;%0Aimport android.support.test.rule.provider.ProviderTestRule;%0Aimport android.support.test.runner.AndroidJUnit4;%0Aimport com.battlelancer.seriesguide.SgApp;%0Aimport com.battlelancer.seriesguide.provider.SeriesGuideContract.Seasons;%0Aimport com.battlelancer.seriesguide.provider.SeriesGuideContract.Shows;%0Aimport com.battlelancer.seriesguide.util.DBUtils;%0Aimport java.util.ArrayList;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0A%0A@RunWith(AndroidJUnit4.class)%0Apublic class ProviderTest %7B%0A%0A    @Rule%0A    public ProviderTestRule providerRule = new ProviderTestRule.Builder(SeriesGuideProvider.class,%0A            SgApp.CONTENT_AUTHORITY).build();%0A%0A    @Test%0A    public void seasonDefaultValues() throws Exception %7B%0A        ContentProviderOperation op = DBUtils%0A                .buildSeasonOp(12, 1234, 42, true);%0A%0A        // note how this does not cause a foreign key constraint failure%0A        ArrayList%3CContentProviderOperation%3E batch = new ArrayList%3C%3E();%0A        batch.add(op);%0A        providerRule.getResolver().applyBatch(SgApp.CONTENT_AUTHORITY, batch);%0A%0A        Cursor query = providerRule.getResolver().query(Seasons.CONTENT_URI, null,%0A                        null, null, null);%0A        assertNotNull(query);%0A        assertTrue(query.moveToFirst());%0A%0A        assertEquals(1234, query.getInt(query.getColumnIndexOrThrow(Seasons._ID)));%0A        assertEquals(12, query.getInt(query.getColumnIndexOrThrow(Shows.REF_SHOW_ID)));%0A        assertEquals(42, query.getInt(query.getColumnIndexOrThrow(Seasons.COMBINED)));%0A        // getInt returns 0 if NULL, so check explicitly%0A        assertFalse(query.isNull(query.getColumnIndexOrThrow(Seasons.WATCHCOUNT)));%0A        assertFalse(query.isNull(query.getColumnIndexOrThrow(Seasons.UNAIREDCOUNT)));%0A        assertFalse(query.isNull(query.getColumnIndexOrThrow(Seasons.NOAIRDATECOUNT)));%0A        assertFalse(query.isNull(query.getColumnIndexOrThrow(Seasons.TOTALCOUNT)));%0A        assertEquals(0, query.getInt(query.getColumnIndexOrThrow(Seasons.WATCHCOUNT)));%0A        assertEquals(0, query.getInt(query.getColumnIndexOrThrow(Seasons.UNAIREDCOUNT)));%0A        assertEquals(0, query.getInt(query.getColumnIndexOrThrow(Seasons.NOAIRDATECOUNT)));%0A        assertEquals(0, query.getInt(query.getColumnIndexOrThrow(Seasons.TOTALCOUNT)));%0A%0A        assertEquals(1, query.getCount());%0A    %7D%0A%7D%0A

Add ProviderTest: assert season default values.