Package info.jtrac.mylyn

Source Code of info.jtrac.mylyn.JtracClientTest

package info.jtrac.mylyn;

import info.jtrac.mylyn.domain.Item;
import info.jtrac.mylyn.domain.JtracVersion;
import junit.framework.TestCase;

public class JtracClientTest extends TestCase {
 
  JtracClient client;
 
  @Override
  public void setUp() {
    client = new JtracClient("http://localhost:8080/jtrac", null, null, null);
  }
 
  public void testGetItem() throws Exception {   
    JtracVersion v = client.getJtracVersion();
    assertNotNull(v.getNumber());
    assertNotNull(v.getTimestamp());
  }
 
  public void testPutItem() throws Exception {
    Item item = new Item();
    item.setSummary("Test Summary");
    item.setDetail("Test Detail");
    item.setLoggedBy("Some Body");
    item.setAssignedTo("Any Body");
    String refId = client.putItem(item);
    assertNotNull(refId);
  }

}
TOP

Related Classes of info.jtrac.mylyn.JtracClientTest

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.