package it.com.atlassian.stash.defaultreviewers;

import com.atlassian.bitbucket.permission.Permission;
import com.atlassian.bitbucket.test.DefaultFuncTestData;
import it.com.atlassian.stash.BaseBrowserFuncTest;
import org.junit.After;
import org.junit.Before;

import static com.atlassian.bitbucket.test.DefaultFuncTestData.getProject1;
import static it.com.atlassian.stash.defaultreviewers.helpers.DefaultReviewerFuncTestHelper.declineAllOpenPullRequests;
import static it.com.atlassian.stash.defaultreviewers.helpers.DefaultReviewerFuncTestHelper.deleteAllDefaultReviewerRules;

abstract class AbstractDefaultReviewerFuncTest extends BaseBrowserFuncTest {

    @Before
    public void setup() {
        testContext.projectPermission(getProject1(), DefaultFuncTestData.getRegularUser(), Permission.PROJECT_READ);
    }

    @After
    public void cleanup() {
        deleteAllDefaultReviewerRules();
        declineAllOpenPullRequests();
    }

}
