@Test public void testDisconnect() throws InterruptedException { TerminalConnection connection = terminalConnectionFactory.getConnection(new SimpleConnectionProperties()); while (true) { TerminalSendAction action = new SimpleTerminalSendAction("[enter]"); connection.doAction(action); System.out.println(connection.getSnapshot()); Thread.sleep(5000); } }
@Test public void testOnline() throws InterruptedException, IOException { terminalConnectionFactory.getProperties().put("SESSION_HOST", "as400.openlegacy.org"); TerminalSession terminalSession = newTerminalSession(); assertSnapshot(terminalSession.getSnapshot(), "/online1.expected"); terminalSession.doAction(TerminalActions.ENTER()); assertSnapshot(terminalSession.getSnapshot(), "/online2.expected"); terminalSession.disconnect(); }