package com.pmease.quickbuild.plugin.tracker.redmine;

import java.util.Map;

import org.junit.Test;

import com.pmease.quickbuild.plugin.report.engine.util.CaseInsensitiveMap;
import com.pmease.quickbuild.plugin.tracker.core.extensionpoint.Issue;

public class RedmineCliTest {
	RedmineCli cli = new RedmineCli("admin", "bitnami", "http://192.168.88.35", "test");
	
	@Test public void testGetIssue() {
		Issue issue = cli.getIssue("1");
		
		System.out.println(issue);
	}
	
	@Test public void testCreateIssue() {
		Map<String, String> map = CaseInsensitiveMap.create();
		map.put("subject", "Build 1.0.11 failed");
		map.put("description", "Please modify your configuration setting");
		map.put("priority_id", "4");
		map.put("custom_field_1", "Samsung");
		map.put(RedmineHelper.ASSIGNED_TO_ID, "1");
		Issue issue = cli.createIssue(map);
		System.out.println(issue);
	}
	
	@Test public void testGetProject() {
		
	}
	
	@Test public void testGetUsers() {
//		cli.getUsers();
	}
}
