Package org.sonar.api.issue.internal

Examples of org.sonar.api.issue.internal.DefaultIssue.status()


      .setNew(false)
      .setEndOfLife(true);
    Date now = new Date();
    workflow.doAutomaticTransition(issue, IssueChangeContext.createScan(now));
    assertThat(issue.resolution()).isEqualTo(Issue.RESOLUTION_FIXED);
    assertThat(issue.status()).isEqualTo(Issue.STATUS_CLOSED);
    assertThat(issue.closeDate()).isNotNull();
    assertThat(issue.updateDate()).isEqualTo(DateUtils.truncate(now, Calendar.SECOND));
  }

  @Test
View Full Code Here


      .setNew(false)
      .setEndOfLife(true);
    Date now = new Date();
    workflow.doAutomaticTransition(issue, IssueChangeContext.createScan(now));
    assertThat(issue.resolution()).isEqualTo(Issue.RESOLUTION_FIXED);
    assertThat(issue.status()).isEqualTo(Issue.STATUS_CLOSED);
    assertThat(issue.closeDate()).isNotNull();
    assertThat(issue.updateDate()).isEqualTo(DateUtils.truncate(now, Calendar.SECOND));
  }

  @Test
View Full Code Here

      .setNew(false)
      .setEndOfLife(true);
    Date now = new Date();
    workflow.doAutomaticTransition(issue, IssueChangeContext.createScan(now));
    assertThat(issue.resolution()).isEqualTo(Issue.RESOLUTION_FIXED);
    assertThat(issue.status()).isEqualTo(Issue.STATUS_CLOSED);
    assertThat(issue.closeDate()).isNotNull();
    assertThat(issue.updateDate()).isEqualTo(DateUtils.truncate(now, Calendar.SECOND));
  }

  @Test
View Full Code Here

      .setNew(false)
      .setEndOfLife(true);
    Date now = new Date();
    workflow.doAutomaticTransition(issue, IssueChangeContext.createScan(now));
    assertThat(issue.resolution()).isEqualTo(Issue.RESOLUTION_FIXED);
    assertThat(issue.status()).isEqualTo(Issue.STATUS_CLOSED);
    assertThat(issue.closeDate()).isNotNull();
    assertThat(issue.updateDate()).isEqualTo(DateUtils.truncate(now, Calendar.SECOND));
  }

View Full Code Here

    workflow.start();
    workflow.doTransition(issue, DefaultTransitions.FALSE_POSITIVE, IssueChangeContext.createScan(new Date()));

    assertThat(issue.resolution()).isEqualTo(Issue.RESOLUTION_FALSE_POSITIVE);
    assertThat(issue.status()).isEqualTo(Issue.STATUS_RESOLVED);

    // should remove assignee
    assertThat(issue.assignee()).isNull();
  }
View Full Code Here

      Transition.create("falsepositive", "OPEN", "RESOLVED")
    );

    workflow.doTransition(issue, "resolve", mock(IssueChangeContext.class));
    assertThat(issue.resolution()).isEqualTo("FIXED");
    assertThat(issue.status()).isEqualTo("RESOLVED");

    assertThat(workflow.outTransitions(issue)).containsOnly(
      Transition.create("reopen", "RESOLVED", "REOPENED")
    );
View Full Code Here

      Transition.create("reopen", "RESOLVED", "REOPENED")
    );

    workflow.doAutomaticTransition(issue, mock(IssueChangeContext.class));
    assertThat(issue.resolution()).isEqualTo("FIXED");
    assertThat(issue.status()).isEqualTo("CLOSED");
  }

  @Test
  public void manual_issues_should_be_confirmed_then_kept_open() throws Exception {
    // Manual issue because of reporter
View Full Code Here

      Transition.create("falsepositive", "OPEN", "RESOLVED")
    );

    workflow.doTransition(issue, "confirm", mock(IssueChangeContext.class));
    assertThat(issue.resolution()).isNull();
    assertThat(issue.status()).isEqualTo("CONFIRMED");

    assertThat(workflow.outTransitions(issue)).containsOnly(
      Transition.create("unconfirm", "CONFIRMED", "REOPENED"),
      Transition.create("resolve", "CONFIRMED", "RESOLVED"),
      Transition.create("falsepositive", "CONFIRMED", "RESOLVED")
View Full Code Here

    );

    // keep confirmed and unresolved
    workflow.doAutomaticTransition(issue, mock(IssueChangeContext.class));
    assertThat(issue.resolution()).isNull();
    assertThat(issue.status()).isEqualTo("CONFIRMED");

    // unconfirm
    workflow.doTransition(issue, "unconfirm", mock(IssueChangeContext.class));
    assertThat(issue.resolution()).isNull();
    assertThat(issue.status()).isEqualTo("REOPENED");
View Full Code Here

    assertThat(issue.status()).isEqualTo("CONFIRMED");

    // unconfirm
    workflow.doTransition(issue, "unconfirm", mock(IssueChangeContext.class));
    assertThat(issue.resolution()).isNull();
    assertThat(issue.status()).isEqualTo("REOPENED");
  }

  @Test
  public void manual_issue_on_removed_rule_should_be_closed() throws Exception {
    // Manual issue because of reporter
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.