@Test(expected = ReactiveAuditException.class) public void readLine_String() { if (System.console() != null) System.console().readLine("", ""); else throw new FileReactiveAuditException(Latency.LOW, "No console"); }
@Test(expected = ReactiveAuditException.class) public void readLine() { if (System.console() != null) System.console().readLine(); else throw new FileReactiveAuditException(Latency.LOW, "No console"); }
@Test(expected = ReactiveAuditException.class) public void readPassword() { if (System.console() != null) System.console().readPassword(); else throw new FileReactiveAuditException(Latency.LOW, "No console"); }
@Test(expected = ReactiveAuditException.class) public void readPassword_String() { if (System.console() != null) System.console().readPassword("", ""); else throw new FileReactiveAuditException(Latency.LOW, "No console"); }
public static FileReactiveAuditException newFile(Latency latency, JoinPoint thisJoinPoint, CharSequence msg) { return new FileReactiveAuditException(latency, (msg == null) ? thisJoinPoint.getSignature().toString() : thisJoinPoint.getSignature().toString() + " " + msg); } }
config.logIfNew(LOW, new FileReactiveAuditException(LOW, "")); assertEquals(0, log[0]); log[0] = 0; config.logIfNew(MEDIUM, new FileReactiveAuditException(MEDIUM, "")); assertEquals(0, log[0]); log[0] = 0; config.logIfNew(HIGH, new FileReactiveAuditException(HIGH, "")); assertEquals(0, log[0]); config.logIfNew(LOW, new FileReactiveAuditException(LOW, "")); assertEquals(1, log[0]); log[0] = 0; config.logIfNew(MEDIUM, new FileReactiveAuditException(MEDIUM, "")); assertEquals(1, log[0]); log[0] = 0; config.logIfNew(HIGH, new FileReactiveAuditException(HIGH, "")); assertEquals(1, log[0]); config.logIfNew(LOW, new FileReactiveAuditException(LOW, "")); assertEquals(0, log[0]); log[0] = 0; config.logIfNew(MEDIUM, new FileReactiveAuditException(MEDIUM, "")); assertEquals(1, log[0]); log[0] = 0; config.logIfNew(HIGH, new FileReactiveAuditException(HIGH, "")); assertEquals(1, log[0]); config.logIfNew(LOW, new FileReactiveAuditException(LOW, "")); assertEquals(0, log[0]);