1 37 90 package net.sourceforge.cruisecontrol.util; 91 92 import java.io.InputStream ; 93 import java.io.OutputStream ; 94 95 100 public class MockProcess extends Process { 101 102 private int exitValue; 103 private InputStream errorStream = null; 104 private InputStream inputStream = null; 105 private OutputStream outputStream = null; 106 107 public MockProcess() { 108 } 109 110 113 public void destroy() { 114 } 115 116 119 public int exitValue() { 120 return exitValue; 121 } 122 123 126 public InputStream getErrorStream() { 127 return errorStream; 128 } 129 130 133 public InputStream getInputStream() { 134 return inputStream; 135 } 136 137 140 public OutputStream getOutputStream() { 141 return outputStream; 142 } 143 144 147 public int waitFor() throws InterruptedException { 148 return exitValue; 149 } 150 151 154 public void setErrorStream(InputStream errorStream) { 155 this.errorStream = errorStream; 156 } 157 158 161 public void setExitValue(int exitValue) { 162 this.exitValue = exitValue; 163 } 164 165 168 public void setInputStream(InputStream inputStream) { 169 this.inputStream = inputStream; 170 } 171 172 175 public void setOutputStream(OutputStream outputStream) { 176 this.outputStream = outputStream; 177 } 178 } 179 | Popular Tags |