package de.tum.in.i22.sentinel.android.app;

/**
 * Created by laurentmeyer on 30/01/16.
 */
public class TransferTest {
}

@@ -38,16 +38,76 @@
 d.app;%0A%0A
+import android.test.AndroidTestCase;%0A%0Aimport java.io.File;%0A%0A
 /**%0A * C
@@ -176,8 +176,727 @@
 est 
-%7B
+extends AndroidTestCase %7B%0A%0A    public void testArePoliciesThere() throws Exception %7B%0A        Utils.passPoliciesFromRawToFile(getContext());%0A        String%5B%5D array = %7B%22Policy.xml%22, %22Policy_App_SMS_1.xml%22, %22Policy_App_SMS_Duration_2.xml%22, %22Policy_App_SMS_Duration_4.xml%22,%0A                %22Policy_Draft.xml%22, %22Policy_DroidBench.xml%22, %22Policy_No_Imei_to_12345.xml%22, %22Policy_No_Location.xml%22, %22Policy_Old.xml%22%7D;%0A        for (String policy : array)%7B%0A            checkFilePresence(policy);%0A        %7D%0A    %7D%0A%0A    private void checkFilePresence(String s)%7B%0A        File sdcard = new File(%22/sdcard/SentinelPolicies/%22);%0A        File toCheck = new File(sdcard, s);%0A        assertTrue(toCheck.exists() && !toCheck.isDirectory());%0A    %7D
 %0A%7D%0A

Test to ensure that the policy are properly copied on the device at the start of the app