Examples of FieldInput


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

    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

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

    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

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

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

  @Test
  public void testGenerate() throws Exception {
    final IssueInputJsonGenerator generator = new IssueInputJsonGenerator();
    final IssueInput issueInput = IssueInput.createWithFields(
        new FieldInput("string", "String value"),
        new FieldInput("integer", 1),
        new FieldInput("long", 1L),
        new FieldInput("complex", new ComplexIssueInputFieldValue(ImmutableMap.<String, Object>of(
            "string", "string",
            "integer", 1,
            "long", 1L,
            "complex", ComplexIssueInputFieldValue.with("test", "id")
        )))
View Full Code Here

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

public class IssueUpdateJsonGeneratorTest {
    @Test
    public void testGenerate() throws Exception {
        final IssueUpdateJsonGenerator generator = new IssueUpdateJsonGenerator();
        List<FieldInput> fields = ImmutableList.of(
            new FieldInput("string", "String value"),
            new FieldInput("integer", 1),
            new FieldInput("long", 1L),
            new FieldInput("complex", new ComplexIssueInputFieldValue(ImmutableMap.<String, Object>of(
                "string", "string",
                "integer", 1,
                "long", 1L,
                "complex", ComplexIssueInputFieldValue.with("test", "id")
            )))
View Full Code Here

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

  @Test
  public void testGenerate() throws Exception {
    final IssueInputJsonGenerator generator = new IssueInputJsonGenerator();
    final IssueInput issueInput = IssueInput.createWithFields(
        new FieldInput("string", "String value"),
        new FieldInput("integer", 1),
        new FieldInput("long", 1L),
        new FieldInput("complex", new ComplexIssueInputFieldValue(ImmutableMap.<String, Object>of(
            "string", "string",
            "integer", 1,
            "long", 1L,
            "complex", ComplexIssueInputFieldValue.with("test", "id")
        )))
View Full Code Here

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

public class JerseyIssueRestClientTest extends AbstractJerseyRestClientTest {

  @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

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

  @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

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

    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, null)));
    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")), pm);
    final Issue changedIssue = client.getIssueClient().getIssue("TST-1", pm);
    assertEquals(newValue, changedIssue.getField(NUMERIC_CUSTOMFIELD_ID).getValue());
  }
View Full Code Here

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

    final Transition transitionFound = TestUtil.getTransitionByName(transitions, "Estimate");

    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, null)));
    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
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.