Package com.taskadapter.redmineapi.internal

Source Code of com.taskadapter.redmineapi.internal.RedmineJSONGeneratorTest

package com.taskadapter.redmineapi.internal;

import static org.junit.Assert.assertTrue;

import org.junit.Test;
import com.taskadapter.redmineapi.bean.Issue;

public class RedmineJSONGeneratorTest {
  /**
   * Ported regression test for
   * http://code.google.com/p/redmine-java-api/issues/detail?id=98 from
   * RedmineXMLGeneratorTest
   */
  @Test
  public void priorityIdIsAddedToXMLIfProvided() {
    Issue issue = new Issue();
    issue.setPriorityId(1);
    final String generatedJSON = RedmineJSONBuilder.toSimpleJSON(
                "some_project_key", issue, RedmineJSONBuilder.ISSUE_WRITER);
    assertTrue(generatedJSON.contains("\"priority_id\":1,"));
  }

}
TOP

Related Classes of com.taskadapter.redmineapi.internal.RedmineJSONGeneratorTest

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.