diff options
Diffstat (limited to 'appc-adapters')
-rw-r--r-- | appc-adapters/appc-ssh-adapter/appc-ssh-adapter-tests/src/test/java/org/onap/appc/adapter/ssh/TestSshAdapterMock.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-tests/src/test/java/org/onap/appc/adapter/ssh/TestSshAdapterMock.java b/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-tests/src/test/java/org/onap/appc/adapter/ssh/TestSshAdapterMock.java index f3badd775..4cea70b47 100644 --- a/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-tests/src/test/java/org/onap/appc/adapter/ssh/TestSshAdapterMock.java +++ b/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-tests/src/test/java/org/onap/appc/adapter/ssh/TestSshAdapterMock.java @@ -3,7 +3,9 @@ * ONAP : APPC * ================================================================================ * Copyright 2018 TechMahindra -*================================================================================= +* ================================================================================ +* Modifications Copyright (c) 2019 IBM +* ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -62,4 +64,14 @@ public class TestSshAdapterMock { assertEquals(false, sshAdapterMock.getConnectionMocks().isEmpty()); assertNotNull(sshAdapterMock.getConnectionMocks()); } + + @Test + public void testGetConnection() { + SshAdapterMock sshAdapterMock = new SshAdapterMock(); + sshAdapterMock.setReturnStatus(200); + sshAdapterMock.setReturnStdout("success"); + sshAdapterMock.setReturnStderr("error"); + sshAdapterMock.getConnection("localhost", 8080, "keyFile"); + assertEquals(false, sshAdapterMock.getConnectionMocks().isEmpty()); + } } |