diff options
author | Sudarshan Kumar <sudars19@in.ibm.com> | 2019-02-15 13:46:22 +0530 |
---|---|---|
committer | Takamune Cho <takamune.cho@att.com> | 2019-02-19 19:39:39 +0000 |
commit | e187ba410c1b4907220784355fca279d8b74ba54 (patch) | |
tree | 297f4dedfd1957a9a62c821fe9e99657ba4a6c30 | |
parent | e182bed98fdd8b413f2f6573318b9f74996477d1 (diff) |
Added test case for TestSshAdapterMock.java
Added additional test case for TestSshAdapterMock.java
Issue-ID: APPC-1372
Change-Id: Ib2b6051cb8a47cc133b378d4fed6de326d37c4e5
Signed-off-by: Sudarshan Kumar <sudars19@in.ibm.com>
-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()); + } } |