本文整理汇总了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);
}