package com.atlassian.stash.internal.notification.pull.handlers;

import com.atlassian.bitbucket.notification.pull.PullRequestClosedNotification;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.runners.MockitoJUnitRunner;

import java.util.Map;

import static org.mockito.Mockito.mock;

@RunWith(MockitoJUnitRunner.class)
public class PullRequestClosedNotificationHandlerTest {

    @InjectMocks
    private PullRequestClosedNotificationHandler notificationHandler;

    @Test
    public void testContextValues() {
        PullRequestClosedNotification notification = mock(PullRequestClosedNotification.class);
        PullRequestNotificationTestUtils.setupNotification(notification);

        Map<String, Object> context = notificationHandler.getContext(notification);

        PullRequestNotificationTestUtils.assertNotification(notification, context);
    }
}
