package org.opendaylight.openflowjava.protocol.impl.core;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
import java.io.InputStream;
}
/**
- * Test keystore file access
- * @throws Exception
+ * Test keystore file access - via classpath
+ * @throws Exception
*/
@Test
public void testAsInputStream() throws Exception {
- InputStream inputStream = SslKeyStore.asInputStream("src/main/resources/key.bin", PathType.PATH);
+ InputStream inputStream = SslKeyStore.asInputStream("/key.bin", PathType.CLASSPATH);
assertNotNull( inputStream );
inputStream.close();
}
/**
- * Test certificate password retrieval
+ * Test keystore file access - via relative path
+ * @throws Exception
*/
@Test
- public void testGetCertificatePassword() {
- char[] password = SslKeyStore.getCertificatePassword();
- assertNotNull(password);
- assertTrue (password.length>0) ;
- }
-
- /**
- * Test keystore password retrieval
- */
- @Test
- public void testGetKeyStorePassword() {
- char[] password = SslKeyStore.getKeyStorePassword() ;
- assertNotNull(password);
- assertTrue (password.length>0) ;
+ public void testAsInputStream2() throws Exception {
+ InputStream inputStream = SslKeyStore.asInputStream("src/test/resources/key.bin", PathType.PATH);
+ assertNotNull( inputStream );
+ inputStream.close();
}
-}
\ No newline at end of file
+}