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

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


    final IssueRestClient issueClient = client.getIssueClient();

    thrown.expect(RestClientException.class);
    thrown.expectMessage("Field 'assignee' cannot be set. It is not on the appropriate screen, or unknown.");

    final IssueInput issueInput = new IssueInputBuilder("TST", 1L, "Issue created by testCreateIssueWithAssigneeWhenNotAllowedToAssignIssue")
        .setAssignee(IntegrationTestUtil.USER_ADMIN)
        .build();
    issueClient.createIssue(issueInput).claim();
  }
View Full Code Here


    thrown.expect(RestClientException.class);
    thrown.expectMessage("You do not have permission to create issues in this project.");

    // TODO: add summary when JIRA bug is fixed (JRADEV-13412)
    final IssueInput issueInput = new IssueInputBuilder("NCIFU", 1L/*, "Issue created by testCreateIssueWithoutCreateIssuePermission"*/)
        .build();
    issueClient.createIssue(issueInput).claim();
  }
 
View Full Code Here

    thrown.expect(RestClientException.class);
    thrown.expectMessage("You do not have permission to create issues in this project.");

    // TODO: add summary when JIRA bug is fixed (JRADEV-13412)
    final IssueInput issueInput = new IssueInputBuilder("RST", 1L/*, "Issue created by testCreateIssueWithoutBrowseProjectPermission"*/)
        .build();
    issueClient.createIssue(issueInput).claim();
  }
 
View Full Code Here

      }
    }
    log.log("");

    // all required data is provided, let's create issue
    final IssueInput issueInput = builder.build();

    final BasicIssue basicCreatedIssue = issueClient.createIssue(issueInput).claim();
    assertNotNull(basicCreatedIssue);

    final Issue createdIssue = issueClient.getIssue(basicCreatedIssue.getKey()).claim();
    assertNotNull(createdIssue);

    log.log("Created new issue successfully, key: " + basicCreatedIssue.getKey());

    // assert few fields
    IssueInputBuilder actualBuilder = new IssueInputBuilder(createdIssue.getProject(), createdIssue
        .getIssueType(), createdIssue.getSummary())
        .setPriority(createdIssue.getPriority())
        .setReporter(createdIssue.getReporter())
        .setAssignee(createdIssue.getAssignee())
        .setDescription(createdIssue.getDescription());

    final Collection<FieldInput> actualValues = actualBuilder.build().getFields().values();
    final Collection<FieldInput> expectedValues = issueInput.getFields().values();

    assertThat(expectedValues, hasItems(toArray(actualValues, FieldInput.class)));
  }
View Full Code Here

public class IssueInputJsonGeneratorTest {

  @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",
View Full Code Here

  }

  @Test
  public void testGenerateWithEmptyInput() throws Exception {
    final IssueInputJsonGenerator generator = new IssueInputJsonGenerator();
    final IssueInput issueInput = new IssueInput(Maps.<String, FieldInput>newHashMap());

    final JSONObject expected = ResourceUtil.getJsonObjectFromResource("/json/issueInput/empty.json");
    final JSONObject actual = generator.generate(issueInput);
    Assert.assertThat(expected, JSONObjectMatcher.isEqual(actual));
  }
View Full Code Here

  }

  @Test
  public void testGenerateWithNullInput() throws Exception {
    final IssueInputJsonGenerator generator = new IssueInputJsonGenerator();
    final IssueInput issueInput = null;

    final JSONObject expected = ResourceUtil.getJsonObjectFromResource("/json/issueInput/empty.json");
    final JSONObject actual = generator.generate(issueInput);
    Assert.assertThat(expected, JSONObjectMatcher.isEqual(actual));
  }
View Full Code Here

TOP

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

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.