Skip to content

Commit

Permalink
Possible fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Jul 26, 2024
1 parent 96efa4b commit c8e3fb8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,11 @@
import org.slf4j.LoggerFactory;
import org.slf4j.bridge.SLF4JBridgeHandler;

import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;

/**
* TODO Add javadoc
*
* @author <a href="mailto:[email protected]">Apache MINA SSHD Project</a>
*/

public abstract class JUnitTestSupport extends Assertions {
public static final String TEMP_SUBFOLDER_NAME = "temp";
public static final boolean OUTPUT_DEBUG_MESSAGES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;

/**
* @author <a href="mailto:[email protected]">Apache MINA SSHD Project</a>
*/
Expand Down Expand Up @@ -109,6 +104,6 @@ protected Result handleHostKeys(
SshException e = assertThrows(SshException.class, () -> handler.process(connectionService,
org.apache.sshd.server.global.OpenSshHostKeysHandler.REQUEST, false, buffer));
assertFalse(handlerCalled[0], "Handler should not have been called");
assertTrue(e.getCause() instanceof GeneralSecurityException, "Expected exception cause");
assertInstanceOf(GeneralSecurityException.class, e.getCause(), "Expected exception cause");
}
}
5 changes: 5 additions & 0 deletions sshd-netty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.sshd</groupId>
<artifactId>sshd-core</artifactId>
Expand Down

0 comments on commit c8e3fb8

Please sign in to comment.