@Override public synchronized void registerClass(final int id, final String className) { this.dos.writeByte(Id.CLAZZ); this.dos.writeInt(id); this.dos.writeString(className); }
@Override public synchronized void describe(final MutationIdentifier i) throws IOException { this.w.writeByte(Id.DESCRIBE); this.w.write(i); this.w.flush(); }
public synchronized void end(final ExitCode exitCode) { this.dos.writeByte(Id.DONE); this.dos.writeInt(exitCode.getCode()); this.dos.flush(); }
@Override public synchronized void report(final MutationIdentifier i, final MutationStatusTestPair mutationDetected) throws IOException { this.w.writeByte(Id.REPORT); this.w.write(i); this.w.write(mutationDetected); this.w.flush(); }
@Override public synchronized void done(final ExitCode exitCode) { this.w.writeByte(Id.DONE); this.w.writeInt(exitCode.getCode()); this.w.flush(); }
@Override public synchronized void recordTestOutcome(final Description description, final boolean wasGreen, final int executionTime) { final Collection<Long> hits = CodeCoverageStore.getHits(); this.dos.writeByte(Id.OUTCOME); this.dos.write(description); this.dos.writeInt(hits.size()); for (final Long each : hits) { this.dos.writeLong(each); } this.dos.writeBoolean(wasGreen); this.dos.writeInt(executionTime); }
@Override public synchronized void registerProbes(int classId, String methodName, String methodDesc, int firstProbe, int lastProbe) { this.dos.writeByte(Id.PROBES); this.dos.writeInt(classId); this.dos.writeString(methodName); this.dos.writeString(methodDesc); this.dos.writeInt(firstProbe); this.dos.writeInt(lastProbe); }
@Test public void shouldPassCommandsToReceiver() throws Exception { final SafeDataOutputStream dos = new SafeDataOutputStream(this.o); dos.writeByte(Id.DESCRIBE); dos.writeByte(Id.DONE); dos.writeInt(ExitCode.OK.getCode()); mockClientSocketInputStream(); this.testee.call(); verify(this.receiveStrategy, times(1)).apply(anyByte(), any(SafeDataInputStream.class)); }
private void mockClientSocketToSendExitCode(final ExitCode timeout) throws IOException { final SafeDataOutputStream dos = new SafeDataOutputStream(this.o); dos.writeByte(Id.DONE); dos.writeInt(timeout.getCode()); mockClientSocketInputStream(); }
@Override public synchronized void registerClass(final int id, final String className) { this.dos.writeByte(Id.CLAZZ); this.dos.writeInt(id); this.dos.writeString(className); }
@Override public synchronized void describe(final MutationIdentifier i) throws IOException { this.w.writeByte(Id.DESCRIBE); this.w.write(i); this.w.flush(); }
@Override public synchronized void done(final ExitCode exitCode) { this.w.writeByte(Id.DONE); this.w.writeInt(exitCode.getCode()); this.w.flush(); }
@Override public synchronized void report(final MutationIdentifier i, final MutationStatusTestPair mutationDetected) throws IOException { this.w.writeByte(Id.REPORT); this.w.write(i); this.w.write(mutationDetected); this.w.flush(); }
public synchronized void end(final ExitCode exitCode) { this.dos.writeByte(Id.DONE); this.dos.writeInt(exitCode.getCode()); this.dos.flush(); }
@Override public synchronized void recordTestOutcome(final Description description, final boolean wasGreen, final int executionTime) { final Collection<Long> hits = CodeCoverageStore.getHits(); this.dos.writeByte(Id.OUTCOME); this.dos.write(description); this.dos.writeInt(hits.size()); for (final Long each : hits) { this.dos.writeLong(each); } this.dos.writeBoolean(wasGreen); this.dos.writeInt(executionTime); }
@Override public synchronized void registerProbes(int classId, String methodName, String methodDesc, int firstProbe, int lastProbe) { this.dos.writeByte(Id.PROBES); this.dos.writeInt(classId); this.dos.writeString(methodName); this.dos.writeString(methodDesc); this.dos.writeInt(firstProbe); this.dos.writeInt(lastProbe); }