Package com.atlassian.jira.rest.client.api.domain.input

Examples of com.atlassian.jira.rest.client.api.domain.input.FieldInput


    thrown.expect(RestClientException.class);
    thrown.expectMessage("project is required");

    final IssueInput issueInput = new IssueInput(ImmutableMap.of(
        "summary", new FieldInput("summary", "Summary"),
        "issuetype", new FieldInput("issuetype", ComplexIssueInputFieldValue.with("id", "1"))
    ));
    issueClient.createIssue(issueInput).claim();
  }
View Full Code Here


  public static final String UTF8_FILE_NAME = "utf8 file name Ka\u017a\u0144 i \u017c\u00f3\u0142to\u015b\u0107 b\u0119d\u0105! | \u1f55\u03b1\u03bb\u03bf\u03bd \u03d5\u03b1\u03b3\u03b5\u1fd6\u03bd \u03b4\u1f7b\u03bd\u03b1\u03bc\u03b1\u03b9\u0387 \u03c4\u03bf\u1fe6\u03c4\u03bf \u03bf\u1f54 \u03bc\u03b5 \u03b2\u03bb\u1f71\u03c0\u03c4\u03b5\u03b9 \u0411\u0438 \u0448\u0438\u043b \u0438\u0434\u044d\u0439 \u0447\u0430\u0434\u043d\u0430, \u043d\u0430\u0434\u0430\u0434 \u0445\u043e\u0440\u0442\u043e\u0439 \u0431\u0438\u0448., or 2\u03c0R";

  @Test
  public void testTransitionWithNumericCustomFieldPolishLocale() throws Exception {
    final double newValue = 123.45;
    final FieldInput fieldInput;
    if (IntegrationTestUtil.TESTING_JIRA_5_OR_NEWER) {
      fieldInput = new FieldInput(NUMERIC_CUSTOMFIELD_ID, newValue);
    } else {
      fieldInput = new FieldInput(NUMERIC_CUSTOMFIELD_ID, NumberFormat.getNumberInstance(new Locale("pl"))
          .format(newValue));
    }
    assertTransitionWithNumericCustomField(fieldInput, newValue);
  }
View Full Code Here

  @Test
  public void testTransitionWithNumericCustomFieldEnglishLocale() throws Exception {
    setUser1();
    final double newValue = 123.45;
    final FieldInput fieldInput = new FieldInput(NUMERIC_CUSTOMFIELD_ID,
        NumberFormat.getNumberInstance(new Locale("pl")).format(newValue));

    assertErrorCode(Response.Status.BAD_REQUEST, IntegrationTestUtil.TESTING_JIRA_5_OR_NEWER
        ? "Operation value must be a number" : ("'" + fieldInput.getValue() + "' is an invalid number"), new Runnable() {
      @Override
      public void run() {
        assertTransitionWithNumericCustomField(fieldInput, newValue);
      }
    });

    final FieldInput fieldInput2 = new FieldInput(NUMERIC_CUSTOMFIELD_ID, newValue); // this will be serialized always with "." according to JSL
    assertTransitionWithNumericCustomField(fieldInput2, newValue);
  }
View Full Code Here

    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)));
    final double newValue = 123;
    final FieldInput fieldInput = new FieldInput(NUMERIC_CUSTOMFIELD_ID, newValue);
    client.getIssueClient().transition(issue.getTransitionsUri(), new TransitionInput(transitionFound.getId(), Arrays
        .asList(fieldInput),
        Comment.valueOf("My test comment"))).claim();
    final Issue changedIssue = client.getIssueClient().getIssue("TST-1").claim();
    assertEquals(newValue, changedIssue.getField(NUMERIC_CUSTOMFIELD_ID).getValue());
View Full Code Here

    assertNotNull(transitionFound);
    assertTrue(Iterables.contains(transitionFound.getFields(),
        new Transition.Field(NUMERIC_CUSTOMFIELD_ID, false,
            TESTING_JIRA_5_OR_NEWER ? NUMERIC_CUSTOMFIELD_TYPE_V5 : NUMERIC_CUSTOMFIELD_TYPE)));
    final FieldInput fieldInput = new FieldInput(NUMERIC_CUSTOMFIELD_ID, "]432jl");
    // warning: Polish language here - I am asserting if the messages are indeed localized
    // since 5.0 messages are changed and not localized
    assertErrorCode(Response.Status.BAD_REQUEST, TESTING_JIRA_5_OR_NEWER
        ? "Operation value must be a number" : "']432jl' nie jest prawid\u0142ow\u0105 liczb\u0105", new Runnable() {
      @Override
View Full Code Here

public class AsynchronousIssueRestClientTest extends AbstractAsynchronousRestClientTest {

  @Test
  public void testTransitionWithNumericCustomFieldPolishLocale() throws Exception {
    final double newValue = 123.45;
    final FieldInput fieldInput;
    if (IntegrationTestUtil.TESTING_JIRA_5_OR_NEWER) {
      fieldInput = new FieldInput(NUMERIC_CUSTOMFIELD_ID, newValue);
    } else {
      fieldInput = new FieldInput(NUMERIC_CUSTOMFIELD_ID, NumberFormat.getNumberInstance(new Locale("pl"))
          .format(newValue));
    }
    assertTransitionWithNumericCustomField(fieldInput, newValue);
  }
View Full Code Here

  @Test
  public void testTransitionWithNumericCustomFieldEnglishLocale() throws Exception {
    setUser1();
    final double newValue = 123.45;
    final FieldInput fieldInput = new FieldInput(NUMERIC_CUSTOMFIELD_ID,
        NumberFormat.getNumberInstance(new Locale("pl")).format(newValue));

    assertErrorCode(Response.Status.BAD_REQUEST, IntegrationTestUtil.TESTING_JIRA_5_OR_NEWER
        ? "Operation value must be a number" : ("'" + fieldInput.getValue() + "' is an invalid number"), new Runnable() {
      @Override
      public void run() {
        assertTransitionWithNumericCustomField(fieldInput, newValue);
      }
    });

    final FieldInput fieldInput2 = new FieldInput(NUMERIC_CUSTOMFIELD_ID, newValue); // this will be serialized always with "." according to JSL
    assertTransitionWithNumericCustomField(fieldInput2, newValue);
  }
View Full Code Here

    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)));
    final double newValue = 123;
    final FieldInput fieldInput = new FieldInput(NUMERIC_CUSTOMFIELD_ID, newValue);
    client.getIssueClient().transition(issue.getTransitionsUri(), new TransitionInput(transitionFound.getId(), Arrays
        .asList(fieldInput),
        Comment.valueOf("My test comment"))).claim();
    final Issue changedIssue = client.getIssueClient().getIssue("TST-1").claim();
    assertEquals(newValue, changedIssue.getField(NUMERIC_CUSTOMFIELD_ID).getValue());
View Full Code Here

    assertNotNull(transitionFound);
    assertTrue(Iterables.contains(transitionFound.getFields(),
        new Transition.Field(NUMERIC_CUSTOMFIELD_ID, false,
            TESTING_JIRA_5_OR_NEWER ? NUMERIC_CUSTOMFIELD_TYPE_V5 : NUMERIC_CUSTOMFIELD_TYPE)));
    final FieldInput fieldInput = new FieldInput(NUMERIC_CUSTOMFIELD_ID, "]432jl");
    // warning: Polish language here - I am asserting if the messages are indeed localized
    // since 5.0 messages are changed and not localized
    assertErrorCode(Response.Status.BAD_REQUEST, TESTING_JIRA_5_OR_NEWER
        ? "Operation value must be a number" : "']432jl' nie jest prawid\u0142ow\u0105 liczb\u0105", new Runnable() {
      @Override
View Full Code Here

    thrown.expect(RestClientException.class);
    thrown.expectMessage("project is required");

    final IssueInput issueInput = new IssueInput(ImmutableMap.of(
        "summary", new FieldInput("summary", "Summary"),
        "issuetype", new FieldInput("issuetype", ComplexIssueInputFieldValue.with("id", "1"))
    ));
    issueClient.createIssue(issueInput).claim();
  }
View Full Code Here

TOP

Related Classes of com.atlassian.jira.rest.client.api.domain.input.FieldInput

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.