本文整理匯總了Java中com.intellij.tasks.mantis.MantisRepositoryType類的典型用法代碼示例。如果您正苦於以下問題:Java MantisRepositoryType類的具體用法?Java MantisRepositoryType怎麽用?Java MantisRepositoryType使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
MantisRepositoryType類屬於com.intellij.tasks.mantis包,在下文中一共展示了MantisRepositoryType類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setUp
import com.intellij.tasks.mantis.MantisRepositoryType; //導入依賴的package包/類
@Override
public void setUp() throws Exception {
super.setUp();
myRepository = new MantisRepository(new MantisRepositoryType());
myRepository.setUrl(MANTIS_1_2_11_TEST_SERVER_URL);
myRepository.setUsername("deva");
myRepository.setPassword("deva");
}
示例2: testMantis12
import com.intellij.tasks.mantis.MantisRepositoryType; //導入依賴的package包/類
public void testMantis12() throws Exception {
MantisRepository mantisRepository = new MantisRepository(new MantisRepositoryType());
mantisRepository.setUrl("http://trackers-tests.labs.intellij.net:8142/");
mantisRepository.setUsername("deva");
mantisRepository.setPassword("deva");
assertTrue(mantisRepository.getProjects().size() >= 2);
final MantisProject mantisProject = mantisRepository.getProjects().get(1);
assertEquals(mantisProject.getName(), "Mantis 1.2 project 1");
mantisRepository.setProject(mantisProject);
assertTrue(mantisProject.getFilters().size() >= 2);
MantisFilter mantisFilter = null;
for (MantisFilter filter : mantisProject.getFilters()) {
if (filter.getName().equals("Mantis 1.2 Filter 1")) {
mantisFilter = filter;
}
}
assertNotNull(mantisFilter);
mantisRepository.setFilter(mantisFilter);
final Task[] issues = mantisRepository.getIssues("", 1, 0);
assertTrue(issues.length >= 1);
final Task task = issues[0];
assertEquals(task.getId(), "1");
assertEquals(task.getProject(), "Mantis 1.2 project 1");
assertEquals(task.getNumber(), "1");
assertEquals(task.getSummary(), "M12P1I1");
final Task task1 = mantisRepository.findTask("1");
assertNotNull(task1);
assertEquals(task1.getId(), "1");
assertEquals(task1.getProject(), "Mantis 1.2 project 1");
assertEquals(task1.getNumber(), "1");
assertEquals(task1.getSummary(), "M12P1I1");
assertEquals(task1.getDescription(), ".");
HttpClient client = new HttpClient();
final GetMethod method = new GetMethod(task1.getIssueUrl());
client.executeMethod(method);
assertEquals(method.getStatusCode(), 200);
}