@Override public void init() { PluginContext context = getContext(); crash = new CRaSH(context); }
public Appendable append(char c) throws IOException { InvocationContextImpl.this.append(c); return this; } public Appendable append(CharSequence csq, int start, int end) throws IOException {
public Screenable cls() throws IOException { InvocationContextImpl.this.cls(); return this; } public void flush() throws IOException {
public void testPipeToFailOnInvokePipe() { lifeCycle.bindClass("producer", CallbackCounterCommand.reset()); lifeCycle.bindClass("consumer", FailOnInvoke.reset()); assertError("producer | consumer", ErrorKind.EVALUATION, SchemaViolationException.class); assertEquals(1, FailOnInvoke.count.get()); assertEquals(0, CallbackCounterCommand.counter.openCount.get()); assertEquals(0, CallbackCounterCommand.counter.provideCound.get()); assertEquals(0, CallbackCounterCommand.counter.flushCount.get()); assertEquals(0, CallbackCounterCommand.counter.closeCount.get()); }
public Shell createShell() { return crash.createSession(null); } }
public void testProducerToFailOnOpenPipe() { lifeCycle.bindClass("producer", Producer.reset()); lifeCycle.bindClass("consumer", FailOnOpen.reset()); assertError("producer | consumer", ErrorKind.EVALUATION, AttributeInUseException.class); assertEquals(0, Producer.count.get()); assertEquals(1, FailOnOpen.counter.openCount.get()); assertEquals(0, FailOnOpen.counter.provideCound.get()); assertEquals(0, FailOnOpen.counter.flushCount.get()); assertEquals(0, FailOnOpen.counter.closeCount.get()); }
public void testProducerToFailOnProvidePipe() { lifeCycle.bindClass("producer", Producer.reset()); lifeCycle.bindClass("consumer", FailOnProvide.reset()); assertError("producer | consumer", ErrorKind.EVALUATION, CommunicationException.class); assertEquals(1, Producer.count.get()); assertEquals(1, FailOnProvide.counter.openCount.get()); assertEquals(1, FailOnProvide.counter.provideCound.get()); assertEquals(1, FailOnProvide.counter.flushCount.get()); assertEquals(1, FailOnProvide.counter.closeCount.get()); }
public void testProducerToFailOnClosePipe() { lifeCycle.bindClass("producer", Producer.reset()); lifeCycle.bindClass("consumer", FailOnClose.reset()); assertError("producer | consumer", ErrorKind.EVALUATION, SizeLimitExceededException.class); assertEquals(1, Producer.count.get()); assertEquals(1, FailOnClose.counter.openCount.get()); assertEquals(1, FailOnClose.counter.provideCound.get()); assertEquals(1, FailOnClose.counter.flushCount.get()); assertEquals(1, FailOnClose.counter.closeCount.get()); }
public void testProducerToFailOnInvokePipe() { lifeCycle.bindClass("producer", Producer.reset()); lifeCycle.bindClass("consumer", FailOnInvoke.reset()); assertError("producer | consumer", ErrorKind.EVALUATION, SchemaViolationException.class); assertEquals(1, FailOnInvoke.count.get()); assertEquals(0, Producer.count.get()); }
public void close() throws IOException { if (useAlternateBuffer) { releaseAlternateBuffer(); } } }
public Shell create(Principal principal) { return create(principal, true); } }
public int getWidth() { return InvocationContextImpl.this.getWidth(); } public int getHeight() {
public void flush() throws IOException { InvocationContextImpl.this.flush(); } });
public static Class<CallbackCounterCommand> reset() { counter.reset(); return CallbackCounterCommand.class; }
public void testFailOnInvokePipeToPipe() { lifeCycle.bindClass("producer", FailOnInvoke.reset()); lifeCycle.bindClass("consumer", CallbackCounterCommand.reset()); assertError("producer | consumer", ErrorKind.EVALUATION, SchemaViolationException.class); assertEquals(1, FailOnInvoke.count.get()); assertEquals(1, CallbackCounterCommand.counter.openCount.get()); assertEquals(0, CallbackCounterCommand.counter.provideCound.get()); assertEquals(1, CallbackCounterCommand.counter.flushCount.get()); assertEquals(1, CallbackCounterCommand.counter.closeCount.get()); }
public Appendable append(CharSequence csq, int start, int end) throws IOException { InvocationContextImpl.this.append(csq, start, end); return this; } public Screenable append(Style style) throws IOException {
public static Class<FailOnOpen> reset() { counter.reset(); return FailOnOpen.class; }
public Screenable append(CharSequence s) throws IOException { InvocationContextImpl.this.append(s); return this; } public Appendable append(char c) throws IOException {
public static Class<FailOnProvide> reset() { counter.reset(); return FailOnProvide.class; }
public Screenable append(Style style) throws IOException { InvocationContextImpl.this.append(style); return this; } public Screenable cls() throws IOException {