/*
* $Id: TlsNamespaceHandlerTestCase.java 20321 2010-11-24 15:21:24Z dfeist $
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com
*
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.transport.ssl;
import org.mule.tck.FunctionalTestCase;
import org.mule.transport.ssl.SslConnector;
public class TlsNamespaceHandlerTestCase extends FunctionalTestCase
{
protected String getConfigResources()
{
return "tls-namespace-config.xml";
}
public void testConnectorProperties() throws Exception
{
SslConnector connector = (SslConnector)muleContext.getRegistry().lookupConnector("sslConnector");
assertNotNull(connector);
assertEquals(1024, connector.getSendBufferSize());
assertEquals(2048, connector.getReceiveBufferSize());
assertTrue(connector.isKeepAlive());
//The full path gets resolved, we're just checkng that the property got set
assertTrue(connector.getKeyStore().endsWith("/serverKeystore"));
assertEquals("mulepassword", connector.getKeyPassword());
assertEquals("mulepassword", connector.getKeyStorePassword());
//The full path gets resolved, we're just checkng that the property got set
assertTrue(connector.getClientKeyStore().endsWith("/clientKeystore"));
assertEquals("mulepassword", connector.getClientKeyStorePassword());
//The full path gets resolved, we're just checkng that the property got set
assertTrue(connector.getTrustStore().endsWith("/trustStore"));
assertEquals("mulepassword", connector.getTrustStorePassword());
assertTrue(connector.isExplicitTrustStoreOnly());
assertTrue(connector.isRequireClientAuthentication());
}
}