Package com.atlassian.jira.rest.client

Examples of com.atlassian.jira.rest.client.NullProgressMonitor


    assertTrue(Iterables.contains(transitions, new Transition("Start Progress", IntegrationTestUtil.START_PROGRESS_TRANSITION_ID, Collections.<Transition.Field>emptyList())));
  }

  @Test
  public void testTransition() throws Exception {
    final Issue issue = client.getIssueClient().getIssue("TST-1", new NullProgressMonitor());
    final Iterable<Transition> transitions = client.getIssueClient().getTransitions(issue, pm);
    assertEquals(4, Iterables.size(transitions));
    final Transition startProgressTransition = new Transition("Start Progress", IntegrationTestUtil.START_PROGRESS_TRANSITION_ID, Collections.<Transition.Field>emptyList());
    assertTrue(Iterables.contains(transitions, startProgressTransition));

    client.getIssueClient().transition(issue, new TransitionInput(IntegrationTestUtil.START_PROGRESS_TRANSITION_ID,
        Collections.<FieldInput>emptyList(), Comment.valueOf("My test comment")), new NullProgressMonitor()) ;
    final Issue transitionedIssue = client.getIssueClient().getIssue("TST-1", new NullProgressMonitor());
    assertEquals("In Progress", transitionedIssue.getStatus().getName());
    final Iterable<Transition> transitionsAfterTransition = client.getIssueClient().getTransitions(issue, pm);
    assertFalse(Iterables.contains(transitionsAfterTransition, startProgressTransition));
    final Transition stopProgressTransition = new Transition("Stop Progress", IntegrationTestUtil.STOP_PROGRESS_TRANSITION_ID, Collections.<Transition.Field>emptyList());
    assertTrue(Iterables.contains(transitionsAfterTransition, stopProgressTransition));
View Full Code Here


  }


  private void assertTransitionWithNumericCustomField(FieldInput fieldInput, Double expectedValue) {
    final Issue issue = client.getIssueClient().getIssue("TST-1", new NullProgressMonitor());
    assertNull(issue.getField(NUMERIC_CUSTOMFIELD_ID).getValue());
    final Iterable<Transition> transitions = client.getIssueClient().getTransitions(issue, pm);

    final Transition transitionFound = TestUtil.getTransitionByName(transitions, "Estimate");
    assertNotNull(transitionFound);
    assertTrue(Iterables.contains(transitionFound.getFields(),
        new Transition.Field(NUMERIC_CUSTOMFIELD_ID, false, IntegrationTestUtil.TESTING_JIRA_5_OR_NEWER ? NUMERIC_CUSTOMFIELD_TYPE_V5 : NUMERIC_CUSTOMFIELD_TYPE)));
    client.getIssueClient().transition(issue, new TransitionInput(transitionFound.getId(), Arrays.asList(fieldInput),
        Comment.valueOf("My test comment")), new NullProgressMonitor());
    final Issue changedIssue = client.getIssueClient().getIssue("TST-1", pm);
    assertTrue(changedIssue.getField(NUMERIC_CUSTOMFIELD_ID).getValue().equals(expectedValue));
  }
View Full Code Here

TOP

Related Classes of com.atlassian.jira.rest.client.NullProgressMonitor

Copyright © 2018 www.massapicom. 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.