package it.com.atlassian.stash.hosting;

import com.atlassian.bitbucket.hook.repository.RepositoryMergeRequestCheckContext;
import com.atlassian.bitbucket.hook.repository.RepositoryMergeRequestCheck;

import javax.annotation.Nonnull;

public class TestRepositoryMergeRequestCheck implements RepositoryMergeRequestCheck {

    private final TestHookMessageProvider testHookMessageProvider;

    public TestRepositoryMergeRequestCheck(TestHookMessageProvider testHookMessageProvider) {
        this.testHookMessageProvider = testHookMessageProvider;
    }

    @Override
    public void check(@Nonnull RepositoryMergeRequestCheckContext context) {
        testHookMessageProvider.putMessage(HostingTestConstants.MERGE_CHECK_CONFIGURED_HOOK_KEY, HostingTestConstants.MERGE_CHECK_CONFIGURED_HOOK_KEY);
    }
}
