package net.heartshield.data;

import android.content.Context;
import android.support.test.InstrumentationRegistry;

import junit.framework.TestCase;

public class AppInfoTest extends TestCase {
    public void testAppInfo() {
        Context appContext = InstrumentationRegistry.getTargetContext();
        // note: is it possible to test writing data to SD card?
        // java.io.FileNotFoundException: /storage/emulated/0/hsh/app_id_info.b (Permission denied)
        // at net.heartshield.data.AppInfo.persistentAppInfo(AppInfo.java:125)
        AppInfo appInfo = AppInfo.getInstance(appContext);
        appInfo.getAppInfo();
    }

    public void testAppMeta() {
        Context appContext = InstrumentationRegistry.getTargetContext();
        // note: is it possible to test writing data to SD card?
        // java.io.FileNotFoundException: /storage/emulated/0/hsh/app_id_info.b (Permission denied)
        // at net.heartshield.data.AppInfo.persistentAppInfo(AppInfo.java:125)
        AppInfo appInfo = AppInfo.getInstance(appContext);
        appInfo.getAppMeta();
    }
}
