Search in sources :

Example 1 with SunJSSESocketFactory

use of org.jpos.iso.SunJSSESocketFactory in project jPOS by jpos.

the class VAPChannelTest method testSetConfiguration.

@Test
public void testSetConfiguration() throws Throwable {
    VAPChannel vAPChannel = new VAPChannel(new Base1Packager());
    vAPChannel.setSocketFactory(new SunJSSESocketFactory());
    vAPChannel.setConfiguration(new SimpleConfiguration());
    assertEquals("vAPChannel.srcid", "000000", vAPChannel.srcid);
    assertEquals("vAPChannel.dstid", "000000", vAPChannel.dstid);
    assertEquals("vAPChannel.getMaxPacketLength()", 100000, vAPChannel.getMaxPacketLength());
    assertEquals("vAPChannel.getPort()", 0, vAPChannel.getPort());
    assertNull("vAPChannel.getSocket()", vAPChannel.getSocket());
    assertEquals("vAPChannel.getTimeout()", 300000, vAPChannel.getTimeout());
    assertFalse("vAPChannel.isOverrideHeader()", vAPChannel.isOverrideHeader());
    assertNull("vAPChannel.getHost()", vAPChannel.getHost());
}
Also used : SunJSSESocketFactory(org.jpos.iso.SunJSSESocketFactory) SimpleConfiguration(org.jpos.core.SimpleConfiguration) Base1Packager(org.jpos.iso.packager.Base1Packager) Test(org.junit.Test)

Aggregations

SimpleConfiguration (org.jpos.core.SimpleConfiguration)1 SunJSSESocketFactory (org.jpos.iso.SunJSSESocketFactory)1 Base1Packager (org.jpos.iso.packager.Base1Packager)1 Test (org.junit.Test)1