Package com.taskadapter.redmineapi.bean

Examples of com.taskadapter.redmineapi.bean.News


    result.setProjectId(JsonInput.getIntOrNull(object, "project_id"));
    return result;
  }

  public static News parseNews(JSONObject object) throws JSONException {
    final News result = NewsFactory.create(JsonInput.getIntOrNull(object, "id"));
    result.setProject(JsonInput.getObjectOrNull(object, "project",
        MINIMAL_PROJECT_PARSER));
    result.setUser(JsonInput.getObjectOrNull(object, "author", USER_PARSER));
    result.setTitle(JsonInput.getStringOrNull(object, "title"));
    result.setDescription(JsonInput.getStringOrNull(object, "description"));
    result.setCreatedOn(getDateOrNull(object, "created_on"));
    result.setLink(JsonInput.getStringOrNull(object, "link"));
    return result;
  }
View Full Code Here


      List<News> news = JsonInput.getListOrEmpty(
          RedmineJSONParser.getResponse(str), "news",
          RedmineJSONParser.NEWS_PARSER);
      assertEquals(2, news.size());

      News anyItem = news.get(0);
      assertEquals("rest last", anyItem.getUser().getFullName());
    } catch (Exception e) {
      fail("Error:" + e);
    }
  }
View Full Code Here

TOP

Related Classes of com.taskadapter.redmineapi.bean.News

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.