package org.commcare.android.mocks;

import android.util.Log;

import org.commcare.activities.CommCareActivity;
import org.commcare.activities.CommCareHomeActivity;
import org.commcare.activities.FormAndDataSyncer;
import org.commcare.android.database.user.models.FormRecord;
import org.commcare.tasks.PullTaskReceiver;

/**
 * Fake object that prevent tests from communicating with server to pull or submit data
 *
 * @author Phillip Mates (pmates@dimagi.com).
 */
public class FormAndDataSyncerFake extends FormAndDataSyncer {
    private final String TAG = FormAndDataSyncerFake.class.getSimpleName();

    public FormAndDataSyncerFake() {
    }

    @Override
    public void processAndSendForms(CommCareHomeActivity activity,
                                    FormRecord[]records,
                                    final boolean syncAfterwards,
                                    final boolean userTriggered) {
        Log.d(TAG, "faking form processing and sending");
    }

    @Override
    public void syncDataForLoggedInUser(CommCareHomeActivity activity,
                                        boolean formsToSend,
                                        boolean userTriggeredSync) {
        Log.d(TAG, "faking data sync");
    }

    @Override
    public <I extends CommCareActivity & PullTaskReceiver> void syncData(final I activity,
                                                                         final boolean formsToSend,
                                                                         final boolean userTriggeredSync,
                                                                         String server,
                                                                         String username,
                                                                         String password) {
        Log.d(TAG, "faking data sync");
    }
}

@@ -269,16 +269,63 @@
 Record;%0A
+import org.commcare.network.DataPullRequester;%0A
 import o
@@ -1291,634 +1291,11 @@
   %7D%0A
-%0A
     
-@Override%0A    public %3CI extends CommCareActivity & PullTaskReceiver%3E void syncData(final I activity,%0A                                                                         final boolean formsToSend,%0A                                                                         final boolean userTriggeredSync,%0A                                                                         String server,%0A                                                                         String username,%0A                                                                         String password) %7B%0A        Log.d(TAG, %22faking data sync%22);%0A    %7D
 %0A%7D%0A

fix build error