// Path: app/src/main/java/protect/card_locker/DBHelper.java
// static class LoyaltyCardDbIds
// {
//     public static final String TABLE = "cards";
//     public static final String ID = "_id";
//     public static final String STORE = "store";
//     public static final String NOTE = "note";
//     public static final String HEADER_COLOR = "headercolor";
//     public static final String HEADER_TEXT_COLOR = "headertextcolor";
//     public static final String CARD_ID = "cardid";
//     public static final String BARCODE_TYPE = "barcodetype";
// }


import android.app.Activity;
import android.graphics.Color;
import android.net.Uri;
import com.google.zxing.BarcodeFormat;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.Robolectric;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;
import java.io.InvalidObjectException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static protect.card_locker.DBHelper.LoyaltyCardDbIds;
package protect.card_locker;


@RunWith(RobolectricTestRunner.class)
@Config(sdk = 23)
public class ImportURITest {
    private ImportURIHelper importURIHelper;
    private DBHelper db;

    @Before
    public void setUp()
    {
        Activity activity = Robolectric.setupActivity(MainActivity.class);
        importURIHelper = new ImportURIHelper(activity);
        db = new DBHelper(activity);
    }

    @Test
    public void ensureNoDataLoss() throws InvalidObjectException
    {
        // Generate card
// Path: app/src/main/java/protect/card_locker/DBHelper.java
// static class LoyaltyCardDbIds
// {
//     public static final String TABLE = "cards";
//     public static final String ID = "_id";
//     public static final String STORE = "store";
//     public static final String NOTE = "note";
//     public static final String HEADER_COLOR = "headercolor";
//     public static final String HEADER_TEXT_COLOR = "headertextcolor";
//     public static final String CARD_ID = "cardid";
//     public static final String BARCODE_TYPE = "barcodetype";
// }


// Path: app/src/test/java/protect/card_locker/ImportURITest.java
import android.app.Activity;
import android.graphics.Color;
import android.net.Uri;
import com.google.zxing.BarcodeFormat;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.Robolectric;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;
import java.io.InvalidObjectException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static protect.card_locker.DBHelper.LoyaltyCardDbIds;

package protect.card_locker;


@RunWith(RobolectricTestRunner.class)
@Config(sdk = 23)
public class ImportURITest {
    private ImportURIHelper importURIHelper;
    private DBHelper db;

    @Before
    public void setUp()
    {
        Activity activity = Robolectric.setupActivity(MainActivity.class);
        importURIHelper = new ImportURIHelper(activity);
        db = new DBHelper(activity);
    }

    @Test
    public void ensureNoDataLoss() throws InvalidObjectException
    {
        // Generate card
        db.insertLoyaltyCard("store", "note", BarcodeFormat.UPC_A.toString(), LoyaltyCardDbIds.BARCODE_TYPE, Color.BLACK, Color.WHITE);