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

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


      }
    });

    // now version updates
    setAdmin();
    final VersionInput newVersionInput = new VersionInputBuilder(versionInput.getProjectKey(), version)
        .setDescription("my updated description").setReleased(true).setName("my updated name").build();
    client.getVersionRestClient().updateVersion(version.getSelf(), newVersionInput, pm);
    final Version modifiedVersion = client.getVersionRestClient().updateVersion(version.getSelf(), newVersionInput, pm);
    assertVersionInputAndVersionEquals(newVersionInput, modifiedVersion);

    final VersionInput duplicateVersionInput = new VersionInputBuilder("TST", modifiedVersion).setName("1.1").build();
    TestUtil.assertErrorCode(Response.Status.BAD_REQUEST, "A version with this name already exists in this project.", new Runnable() {
      @Override
      public void run() {
        client.getVersionRestClient().updateVersion(modifiedVersion.getSelf(), duplicateVersionInput, pm);
      }
    });

    setAnonymousMode();
    TestUtil.assertErrorCode(IntegrationTestUtil.TESTING_JIRA_5_OR_NEWER ? Response.Status.NOT_FOUND : Response.Status.UNAUTHORIZED, new Runnable() {
      @Override
      public void run() {
        client.getVersionRestClient().updateVersion(modifiedVersion.getSelf(), newVersionInput, pm);
      }
    });

    setAdmin();
    final Version restrictedVersion = client.getVersionRestClient().createVersion(new VersionInputBuilder("RST").setName("My version").build(), pm);
    final VersionInput restrictedVersionInput = new VersionInputBuilder("RST", restrictedVersion).setDescription("another description").build();
    setUser2();
    TestUtil.assertErrorCode(Response.Status.NOT_FOUND, "You must have browse project rights in order to view versions.", new Runnable() {
      @Override
      public void run() {
        client.getVersionRestClient().updateVersion(restrictedVersion.getSelf(), restrictedVersionInput, pm);
View Full Code Here

TOP

Related Classes of com.atlassian.jira.rest.client.domain.input.VersionInputBuilder

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.