public static void assertMessagesLogged(Collection<String> expectedPatternsRO, Collection<String> unexpectedPatterns, String filterPattern, boolean verbose) { assertLogMessages(expectedPatternsRO, unexpectedPatterns, null, null, filterPattern, verbose); }
private void injectGatewayName(LoggingEvent event) { if (!injectGatewayName(event, "renderedMessage")) { injectGatewayName(event, "message"); } }
/** * Creates a rule (chain) out of a k3po rule and gateway rule, adding extra rules as follows:<ol> * <li> a timeout rule to have tests time out if they run for more than 10 seconds * <li> a rule to print console messages at the start and end of each test method and print trace level * log messages on test failure. * </ol> * @param gateway Rule to start up and shut down the gateway * @param robot Rule to startup and stop k3po * @return A TestRule which should be the only public @Rule in our robot tests */ public static RuleChain createRuleChain(TestRule gateway, K3poRule robot) { return createRuleChain(gateway, robot, 10, SECONDS); }
@Override public void succeeded(Description description) { System.out.println(getFullMethodName(description) + " success" + getDuration()); MemoryAppender.initialize(); }
public void assertEquals(Object s1, Object s2) { try { Assert.assertEquals(s1, s2); } catch (AssertionError error) { failures.add(error); } }
/** * Creates a rule chain containing the following rules:<ol> * <li> a timeout rule * <li> a rule to print console messages at the start and end of each test method and print trace level * log messages on test failure. * </ol> * @param timeout The maximum allowed time duration of the test * @param timeUnit The unit for the timeout * @return */ public static RuleChain createRuleChain(long timeout, TimeUnit timeUnit) { TestRule timeoutRule = timeoutRule(timeout, timeUnit); TestRule trace = new MethodExecutionTrace(); return RuleChain.outerRule(trace).around(timeoutRule); }
public TransportTestConnectSessionInitializer(int desiredCount) { latch = new CountDownLatch(desiredCount); failures = new ThrowableContainer(); }
@Override public void close() { debug("MemoryAppender instance " + this + " closed"); }
public MethodExecutionTrace(Properties log4jProperties) { MemoryAppender.initialize(); if (log4jProperties != null) { PropertyConfigurator.configure(log4jProperties); } }
@Override public Statement apply(Statement base, Description description) { if (base instanceof InvokeMethod) { return doApplyInvokeMethod(in, base, (InvokeMethod) base); } return in.apply(base, null, description); }
public void assertEquals(boolean s1, boolean s2) { try { Assert.assertEquals(s1, s2); } catch (AssertionError error) { failures.add(error); } }
public TransportTestIoHandlerAdapter(int desiredCount) { latch = new CountDownLatch(desiredCount); failures = new ThrowableContainer(); }
public void assertEquals(int s1, int s2) { try { Assert.assertEquals(s1, s2); } catch (AssertionError error) { failures.add(error); } }
public void assertEquals(double s1, double s2) { try { Assert.assertEquals(s1, s2); } catch (AssertionError error) { failures.add(error); } }
public void assertEquals(boolean s1, boolean s2) { try { Assert.assertEquals(s1, s2); } catch (AssertionError error) { failures.add(error); } }
public void assertEquals(int s1, int s2) { try { Assert.assertEquals(s1, s2); } catch (AssertionError error) { failures.add(error); } }
public void assertEquals(double s1, double s2) { try { Assert.assertEquals(s1, s2); } catch (AssertionError error) { failures.add(error); } }
public void assertEquals(String msg, Object s1, Object s2) { try { Assert.assertEquals(msg, s1, s2); } catch (AssertionError error) { failures.add(error); } }
public void assertEquals(Object s1, Object s2) { try { Assert.assertEquals(s1, s2); } catch (AssertionError error) { failures.add(error); } }