[test] Fix invalid cast

Signed-off-by: Emmanuel Bigeon <emmanuel@bigeon.fr>
This commit is contained in:
Emmanuel Bigeon 2021-11-22 08:19:53 +01:00
parent 0f731270d5
commit 6bb3ad2354

View File

@ -63,8 +63,7 @@ public class ConnectingConsoleInputTest {
public void testCoveragePrompt() {
final ConnectingConsoleInput in = new ConnectingConsoleInput();
in.setPrompt("test");
assertEquals("Prompt should be set correctly", "test",
((ConstantString) in.getPrompt()).get());
assertEquals("Prompt should be set correctly", "test", in.getPrompt().get());
final ConstantString prompt = new ConstantString("other");
in.setPrompt(prompt);
assertEquals("Prompt should be set correctly", prompt, in.getPrompt());