use of org.opennms.api.integration.ticketing.Ticket in project opennms by OpenNMS.
the class Otrs31TicketerPluginTest method testCreate.
@Test
public void testCreate() throws PluginException {
otrsPlugin.saveOrUpdate(s_ticket);
Ticket otrsTicket = otrsPlugin.get(s_ticket.getId());
assertTicketEquals(s_ticket, otrsTicket);
}
use of org.opennms.api.integration.ticketing.Ticket in project opennms by OpenNMS.
the class JiraTicketerPluginTest method get.
private void get(String ticketId) throws PluginException {
Ticket newTicket = m_ticketer.get(ticketId);
assertNotNull(newTicket);
assertEquals(ticketId, newTicket.getId());
assertEquals(Ticket.State.OPEN, newTicket.getState());
assertTrue("Unexpected summary: " + newTicket.getSummary(), newTicket.getSummary().contains("This is the summary"));
assertTrue("Unexpected description: " + newTicket.getDetails(), newTicket.getDetails().contains("details"));
}
use of org.opennms.api.integration.ticketing.Ticket in project opennms by OpenNMS.
the class JiraTicketerPluginTest method verifyTooManyFiles.
@Test
@Ignore
public void verifyTooManyFiles() throws PluginException {
JiraTicketerPlugin plugin = new JiraTicketerPlugin();
for (int i = 0; i < 500; i++) {
System.out.print(i + ": ");
Ticket ticket = plugin.get("NMS-8947");
System.out.print(ticket.getSummary() + "\n");
}
}
use of org.opennms.api.integration.ticketing.Ticket in project opennms by OpenNMS.
the class RemedyTicketerPluginTest method setUp.
@Override
protected void setUp() throws Exception {
System.setProperty("opennms.home", "src" + File.separatorChar + "test" + File.separatorChar + "opennms-home");
m_ticketer = new RemedyTicketerPlugin();
m_ticket = new Ticket();
m_ticket.setState(Ticket.State.OPEN);
m_ticket.setSummary("Test OpenNMS Integration");
m_ticket.setDetails("Created by Axis java client. Date: " + new Date());
m_ticket.setUser("antonio@opennms.it");
}
use of org.opennms.api.integration.ticketing.Ticket in project opennms by OpenNMS.
the class RemedyTicketerPluginTest method testSaveAndGet.
public void testSaveAndGet() {
try {
m_ticketer.saveOrUpdate(m_ticket);
m_ticketId = m_ticket.getId();
Ticket ticket = m_ticketer.get(m_ticketId);
assertEquals(m_ticketId, ticket.getId());
assertEquals(State.OPEN, ticket.getState());
} catch (PluginException e) {
e.printStackTrace();
}
}
Aggregations