package com.atlassian.bitbucket.internal.scm.check;

import com.atlassian.bitbucket.scm.ScmRequestCheck;
import com.atlassian.bitbucket.i18n.I18nService;
import com.atlassian.bitbucket.i18n.SimpleI18nService;
import com.atlassian.bitbucket.scm.AuthenticationState;
import com.atlassian.bitbucket.scm.ScmRequest;
import org.mockito.Mock;
import org.mockito.Spy;

import static org.mockito.Matchers.eq;
import static org.mockito.Matchers.same;
import static org.mockito.Mockito.verify;

/**
 * A simple base class for constructing {@link ScmRequestCheck request check} tests.
 *
 * @since 2.4
 */
public class AbstractScmRequestCheckTest {

    @Spy
    @SuppressWarnings("unused")
    protected I18nService i18nService = new SimpleI18nService(SimpleI18nService.Mode.RETURN_KEYS);
    @Mock
    protected ScmRequest scmRequest;

    protected void verifySendError(String titleKey, String detailKey) throws Exception {
        verify(scmRequest).sendError(eq(titleKey), eq(detailKey));
    }
}
