4 import org.junit.Before;
16 public void setUpDevicesTestCase()
throws IOException {
17 initializeDeviceCommunicator();
20 private void initializeDeviceCommunicator(){
25 private InputStream inputStream;
26 private OutputStream outputStream;
29 this.inputStream =
new ByteArrayInputStream(
32 this.outputStream =
new ByteArrayOutputStream();
36 return this.inputStream;
40 return this.outputStream;
44 this.inputStream =
new ByteArrayInputStream(
45 dataForDeviceToRead.getBytes()
50 String data = this.outputStream.toString();
51 this.outputStream =
new ByteArrayOutputStream();
56 this.inputStream =
new ByteArrayInputStream(
59 this.outputStream =
new ByteArrayOutputStream();
String getOutputStreamData()
InputStream getInputStream()
void setInputStreamData(String dataForDeviceToRead)
OutputStream getOutputStream()