diff options
Diffstat (limited to 'src/cz/crcs/ectester/common/output/TestableWriter.java')
| -rw-r--r-- | src/cz/crcs/ectester/common/output/TestableWriter.java | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/src/cz/crcs/ectester/common/output/TestableWriter.java b/src/cz/crcs/ectester/common/output/TestableWriter.java deleted file mode 100644 index 9876064..0000000 --- a/src/cz/crcs/ectester/common/output/TestableWriter.java +++ /dev/null @@ -1,65 +0,0 @@ -package cz.crcs.ectester.common.output; - -import cz.crcs.ectester.common.test.BaseTestable; -import cz.crcs.ectester.reader.output.ResponseWriter; -import cz.crcs.ectester.reader.response.Response; -import cz.crcs.ectester.reader.test.CommandTestable; -import cz.crcs.ectester.standalone.test.KeyAgreementTestable; -import cz.crcs.ectester.standalone.test.KeyGeneratorTestable; -import cz.crcs.ectester.standalone.test.SignatureTestable; - -import java.io.OutputStream; -import java.io.PrintStream; - -/** - * @author Jan Jancar johny@neuromancer.sk - */ -public class TestableWriter { - private PrintStream output; - private ResponseWriter respWriter; - - public TestableWriter(PrintStream output) { - this.output = output; - this.respWriter = new ResponseWriter(output); - } - - public TestableWriter(OutputStream output) { - this(new PrintStream(output)); - } - - public String outputTestableSuffix(BaseTestable t) { - if (t instanceof CommandTestable) { - Response r = ((CommandTestable) t).getResponse(); - return respWriter.responseSuffix(r); - } else if (t instanceof KeyAgreementTestable) { - - } else if (t instanceof KeyGeneratorTestable) { - - } else if (t instanceof SignatureTestable) { - - } - return null; - } - - public void writeTestableSuffix(BaseTestable t) { - output.println(outputTestableSuffix(t)); - } - - public String outputTestable(BaseTestable t) { - if (t instanceof CommandTestable) { - CommandTestable testable = (CommandTestable) t; - return respWriter.responseString(testable.getResponse()); - } else if (t instanceof KeyAgreementTestable) { - - } else if (t instanceof KeyGeneratorTestable) { - - } else if (t instanceof SignatureTestable) { - - } - return null; - } - - public void writeTestable(BaseTestable t) { - output.println(outputTestable(t)); - } -} |
