diff options
| author | J08nY | 2017-11-13 18:03:00 +0100 |
|---|---|---|
| committer | J08nY | 2017-11-13 18:03:00 +0100 |
| commit | cccf2c9c382fa63c68a6c3821d587bc2caa72b05 (patch) | |
| tree | c97b1ce7c3a81b0b2c23d6c36a2c22bef8056c2d /src/cz/crcs/ectester/reader/test/CommandTest.java | |
| parent | 9e615b101398bd4c8e2678bf86337e2756a8ee7a (diff) | |
| download | ECTester-cccf2c9c382fa63c68a6c3821d587bc2caa72b05.tar.gz ECTester-cccf2c9c382fa63c68a6c3821d587bc2caa72b05.tar.zst ECTester-cccf2c9c382fa63c68a6c3821d587bc2caa72b05.zip | |
Add KeyAgreement/KeyGeneration/Signature tests. Implement KeyAgreementTest.
Diffstat (limited to '')
| -rw-r--r-- | src/cz/crcs/ectester/reader/test/CommandTest.java (renamed from src/cz/crcs/ectester/reader/test/SimpleTest.java) | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cz/crcs/ectester/reader/test/SimpleTest.java b/src/cz/crcs/ectester/reader/test/CommandTest.java index 067f43e..b7728b6 100644 --- a/src/cz/crcs/ectester/reader/test/SimpleTest.java +++ b/src/cz/crcs/ectester/reader/test/CommandTest.java @@ -13,24 +13,24 @@ import java.util.function.BiFunction; * A simple test that runs one Command to get and evaluate one Response * to get a Result and compare it with the expected one. */ -public class SimpleTest extends Test { +public class CommandTest extends Test { private BiFunction<Command, Response, Result> callback; private Command command; private Response response; - public SimpleTest(Command command, BiFunction<Command, Response, Result> callback) { + public CommandTest(Command command, BiFunction<Command, Response, Result> callback) { this.command = command; this.callback = callback; } - public SimpleTest(Command command, Result.ExpectedValue expected, String ok, String nok) { + public CommandTest(Command command, Result.ExpectedValue expected, String ok, String nok) { this(command, (cmd, resp) -> { Result.Value resultValue = Result.Value.fromExpected(expected, resp.successful(), resp.error()); return new Result(resultValue, resultValue.ok() ? ok : nok); }); } - public SimpleTest(Command command, Result.ExpectedValue expected) { + public CommandTest(Command command, Result.ExpectedValue expected) { this(command, expected, null, null); } |
