diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2024-12-03 09:57:56 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2024-12-03 09:57:56 -0500 |
| commit | 0123ebaac66527b0e17d89cec8b41e073afba885 (patch) | |
| tree | f13f44da185d68cb0c0b41b7c8addeacb5d88b4b /src/test/java/derms | |
| parent | 33732b560ddc12e2a9e99729666ad88286013668 (diff) | |
| download | soen423-0123ebaac66527b0e17d89cec8b41e073afba885.zip | |
separate responder client from cli
Diffstat (limited to 'src/test/java/derms')
| -rw-r--r-- | src/test/java/derms/test/SystemTest.java | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/test/java/derms/test/SystemTest.java b/src/test/java/derms/test/SystemTest.java index 3ae83a8..59b08fa 100644 --- a/src/test/java/derms/test/SystemTest.java +++ b/src/test/java/derms/test/SystemTest.java @@ -78,8 +78,7 @@ class SystemTest { ReplicaManager.main(argsRM); ResponderClient responderClient = new ResponderClient(IP); - ResponderClient.Add addCommand = responderClient.new Add(); - addCommand.add("MTL1001", "ambulance", "10"); + responderClient.addResource("MTL1001", "ambulance", 10); // Compare the number of lines in the log files, to determine if they match or not assertTrue(LogComparator.compareFiles(TEST_LOG_PATH, EXPECTED_LOG_PATH_NORM)); @@ -96,8 +95,7 @@ class SystemTest { ReplicaManager.main(argsRM); ResponderClient responderClient = new ResponderClient(IP); - ResponderClient.Add addCommand = responderClient.new Add(); - addCommand.add("MTL1001", "ambulance", "10"); + responderClient.addResource("MTL1001", "ambulance", 10); // Compare the number of lines in the log files, to determine if they match or not assertTrue(LogComparator.compareFiles(TEST_LOG_PATH, EXPECTED_LOG_PATH_BYZ)); @@ -114,8 +112,7 @@ class SystemTest { ReplicaManager.main(argsRM); ResponderClient responderClient = new ResponderClient(IP); - ResponderClient.Add addCommand = responderClient.new Add(); - addCommand.add("MTL1001", "ambulance", "10"); + responderClient.addResource("MTL1001", "ambulance", 10); // Compare the number of lines in the log files, to determine if they match or not assertTrue(LogComparator.compareFiles(TEST_LOG_PATH, EXPECTED_LOG_PATH_CRASH)); @@ -146,8 +143,7 @@ class SystemTest { e.printStackTrace(); } finally { if (responderClient != null) { - ResponderClient.Add addCommand = responderClient.new Add(); - addCommand.add("MTL1001", "ambulance", "10"); + responderClient.addResource("MTL1001", "ambulance", 10); } } }); @@ -160,8 +156,7 @@ class SystemTest { e.printStackTrace(); } finally { if (responderClient2 != null) { - ResponderClient.Add addCommand2 = responderClient2.new Add(); - addCommand2.add("MTL1002", "ambulance", "11"); + responderClient2.addResource("MTL1002", "ambulance", 11); } } }); |