// Path: src/main/java/org/sonar/plugins/stash/StashPlugin.java
// public enum IssueType {
//   CONTEXT,
//   REMOVED,
//   ADDED,
// }


import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.sonar.plugins.stash.StashPlugin.IssueType;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

package org.sonar.plugins.stash.issue;



public class StashDiffTest {

  StashDiff diff1;
  StashDiff diff2;
  StashDiff diff3;

  @BeforeEach
  public void setUp() {
    StashComment comment1 = mock(StashComment.class);
    when(comment1.getId()).thenReturn((long)12345);

    StashComment comment2 = mock(StashComment.class);
    when(comment2.getId()).thenReturn((long)54321);

    diff1 = new StashDiff(IssueType.CONTEXT, "path/to/diff1", (long)10, (long)20);
    diff1.addComment(comment1);

    diff2 = new StashDiff(IssueType.ADDED, "path/to/diff2", (long)20, (long)30);
    diff2.addComment(comment2);

    diff3 = new StashDiff(IssueType.CONTEXT, "path/to/diff3", (long)30, (long)40);
  }

  @Test
  public void testIsTypeOfContext() {

// Path: src/main/java/org/sonar/plugins/stash/StashPlugin.java
// public enum IssueType {
//   CONTEXT,
//   REMOVED,
//   ADDED,
// }


// Path: src/test/java/org/sonar/plugins/stash/issue/StashDiffTest.java
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.sonar.plugins.stash.StashPlugin.IssueType;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

package org.sonar.plugins.stash.issue;



public class StashDiffTest {

  StashDiff diff1;
  StashDiff diff2;
  StashDiff diff3;

  @BeforeEach
  public void setUp() {
    StashComment comment1 = mock(StashComment.class);
    when(comment1.getId()).thenReturn((long)12345);

    StashComment comment2 = mock(StashComment.class);
    when(comment2.getId()).thenReturn((long)54321);

    diff1 = new StashDiff(IssueType.CONTEXT, "path/to/diff1", (long)10, (long)20);
    diff1.addComment(comment1);

    diff2 = new StashDiff(IssueType.ADDED, "path/to/diff2", (long)20, (long)30);
    diff2.addComment(comment2);

    diff3 = new StashDiff(IssueType.CONTEXT, "path/to/diff3", (long)30, (long)40);
  }

  @Test
  public void testIsTypeOfContext() {

    assertEquals(IssueType.CONTEXT, diff1.getType());
