package com.avg.zaap.crashlibrary.crashlibmocks;

import android.content.Context;
import android.support.annotation.NonNull;

import com.avg.zaap.crashlibrary.CrashLibTests;
import com.avg.zaap.crashlibrary.ReportData;
import com.avg.zaap.crashlibrary.publish.ICrashPublisher;
import com.avg.zaap.crashlibrary.publish.ICrashPublisherCallback;

/**
 * Class used in {@link CrashLibTests} when unit testing annotation.
 * Created by marek.osvald on 29.6.2016.
 */
public class CrashPublisherWithIllegalAccessException implements ICrashPublisher {

    public CrashPublisherWithIllegalAccessException() throws IllegalAccessException {
        throw new IllegalAccessException();
    }

    @Override
    public void publish(Context context, @NonNull ReportData reportData, @NonNull String filePath, ICrashPublisherCallback callback) {
        callback.onCrashPublisherSuccess(getClass().getSimpleName(), reportData);
    }

}
