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

Examples of com.atlassian.jira.rest.client.api.domain.ServerInfo


    final int buildNumber = json.getInt("buildNumber");
    final DateTime buildDate = JsonParseUtil.parseDateTime(json, "buildDate");
    final DateTime serverTime = JsonParseUtil.parseOptionalDateTime(json, "serverTime");
    final String scmInfo = json.getString("scmInfo");
    final String serverTitle = json.getString("serverTitle");
    return new ServerInfo(baseUri, version, buildNumber, buildDate, serverTime, scmInfo, serverTitle);
  }
View Full Code Here


public class ServerInfoJsonParserTest {
  @Test
  public void testParse() throws Exception {
    final ServerInfoJsonParser parser = new ServerInfoJsonParser();
    final ServerInfo serverInfo = parser.parse(ResourceUtil.getJsonObjectFromResource("/json/serverInfo/valid.json"));
    Assert.assertEquals(new ServerInfo(TestUtil.toUri("http://localhost:8090/jira"), "4.2-SNAPSHOT",
        580, TestUtil.toDateTime("2010-09-23T00:00:00.000+0200"), TestUtil.toDateTime("2010-09-30T16:11:09.767+0200"),
        "abc128082", "Your Company JIRA"), serverInfo);
  }
View Full Code Here

  }

  @Test
  public void testParseAnonymous() throws Exception {
    final ServerInfoJsonParser parser = new ServerInfoJsonParser();
    final ServerInfo serverInfo = parser.parse(ResourceUtil
        .getJsonObjectFromResource("/json/serverInfo/valid-for-anonymous.json"));
    Assert.assertEquals(new ServerInfo(TestUtil.toUri("http://localhost:8090/jira"), "4.2-SNAPSHOT",
        580, TestUtil.toDateTime("2010-09-23T00:00:00.000+0200"), null, "128082", "Your Company JIRA"), serverInfo);

  }
View Full Code Here

TOP

Related Classes of com.atlassian.jira.rest.client.api.domain.ServerInfo

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.