Search in sources :

Example 1 with ReliableMessagingConfiguration

use of org.mule.extension.ws.api.reliablemessaging.ReliableMessagingConfiguration in project mule-wsc-connector by mulesoft.

the class ConfigEqualsTestCase method testReliableMessagingNotEquals.

@Test
public void testReliableMessagingNotEquals() {
    EasyRandomParameters parameters = new EasyRandomParameters();
    parameters.collectionSizeRange(1, 3);
    EasyRandom factory = new EasyRandom(parameters);
    ReliableMessagingConfiguration reliableMessaging = factory.nextObject(ReliableMessagingConfiguration.class);
    assertThat(reliableMessaging, is(notNullValue()));
    assertThat(reliableMessaging, not(equalTo(new Object())));
}
Also used : EasyRandomParameters(org.jeasy.random.EasyRandomParameters) ReliableMessagingConfiguration(org.mule.extension.ws.api.reliablemessaging.ReliableMessagingConfiguration) EasyRandom(org.jeasy.random.EasyRandom) Test(org.junit.Test)

Example 2 with ReliableMessagingConfiguration

use of org.mule.extension.ws.api.reliablemessaging.ReliableMessagingConfiguration in project mule-wsc-connector by mulesoft.

the class RMConfigInitialiseTestCase method defaultWsrmVersionFromWsa2004VersionTest.

@Test
public void defaultWsrmVersionFromWsa2004VersionTest() throws InitialisationException {
    EasyRandom factory = new EasyRandom(parameters.randomize(String.class, () -> null));
    ReliableMessagingConfiguration config = factory.nextObject(ReliableMessagingConfiguration.class);
    config.doInitialise(WSA200408, initialisable);
    assertEquals(WSRM_10_WSA_200408, config.getVersion());
}
Also used : ReliableMessagingConfiguration(org.mule.extension.ws.api.reliablemessaging.ReliableMessagingConfiguration) EasyRandom(org.jeasy.random.EasyRandom) Test(org.junit.Test)

Example 3 with ReliableMessagingConfiguration

use of org.mule.extension.ws.api.reliablemessaging.ReliableMessagingConfiguration in project mule-wsc-connector by mulesoft.

the class RMConfigInitialiseTestCase method doInitialiseTest.

@Test
public void doInitialiseTest() throws InitialisationException {
    AddressingVersion wsaVersion = WSA200408;
    ReliableMessagingVersion wsrmVersion = WSRM_10_WSA_200408;
    EasyRandom factory = new EasyRandom(parameters.randomize(String.class, () -> wsrmVersion.name()));
    ReliableMessagingConfiguration config = factory.nextObject(ReliableMessagingConfiguration.class);
    config.doInitialise(wsaVersion, initialisable);
    assertEquals(wsrmVersion, config.getVersion());
}
Also used : AddressingVersion(org.mule.extension.ws.api.addressing.AddressingVersion) ReliableMessagingConfiguration(org.mule.extension.ws.api.reliablemessaging.ReliableMessagingConfiguration) ReliableMessagingVersion(org.mule.extension.ws.api.reliablemessaging.ReliableMessagingVersion) EasyRandom(org.jeasy.random.EasyRandom) Test(org.junit.Test)

Example 4 with ReliableMessagingConfiguration

use of org.mule.extension.ws.api.reliablemessaging.ReliableMessagingConfiguration in project mule-wsc-connector by mulesoft.

the class RMConfigInitialiseTestCase method defaultWsrmVersionFromWsa2005VersionTest.

@Test
public void defaultWsrmVersionFromWsa2005VersionTest() throws InitialisationException {
    EasyRandom factory = new EasyRandom(parameters.randomize(String.class, () -> null));
    ReliableMessagingConfiguration config = factory.nextObject(ReliableMessagingConfiguration.class);
    config.doInitialise(WSA200508, initialisable);
    assertEquals(WSRM_11_WSA_200508, config.getVersion());
}
Also used : ReliableMessagingConfiguration(org.mule.extension.ws.api.reliablemessaging.ReliableMessagingConfiguration) EasyRandom(org.jeasy.random.EasyRandom) Test(org.junit.Test)

Example 5 with ReliableMessagingConfiguration

use of org.mule.extension.ws.api.reliablemessaging.ReliableMessagingConfiguration in project mule-wsc-connector by mulesoft.

the class RMConfigInitialiseTestCase method failConfigInitWithInvalidPairOfWsaWsrmVersionsTest.

@Test
public void failConfigInitWithInvalidPairOfWsaWsrmVersionsTest() throws InitialisationException {
    AddressingVersion wsaVersion = WSA200408;
    ReliableMessagingVersion wsrmVersion = WSRM_11_WSA_200508;
    expectedException.expect(InitialisationException.class);
    expectedException.expectMessage("Invalid WSRM version configured [" + wsrmVersion.name() + "] for the selected WSA version [" + wsaVersion.name() + "].");
    EasyRandom factory = new EasyRandom(parameters.randomize(String.class, () -> wsrmVersion.name()));
    ReliableMessagingConfiguration config = factory.nextObject(ReliableMessagingConfiguration.class);
    config.doInitialise(wsaVersion, initialisable);
}
Also used : AddressingVersion(org.mule.extension.ws.api.addressing.AddressingVersion) ReliableMessagingConfiguration(org.mule.extension.ws.api.reliablemessaging.ReliableMessagingConfiguration) ReliableMessagingVersion(org.mule.extension.ws.api.reliablemessaging.ReliableMessagingVersion) EasyRandom(org.jeasy.random.EasyRandom) Test(org.junit.Test)

Aggregations

EasyRandom (org.jeasy.random.EasyRandom)8 Test (org.junit.Test)8 ReliableMessagingConfiguration (org.mule.extension.ws.api.reliablemessaging.ReliableMessagingConfiguration)8 EasyRandomParameters (org.jeasy.random.EasyRandomParameters)2 AddressingVersion (org.mule.extension.ws.api.addressing.AddressingVersion)2 ReliableMessagingVersion (org.mule.extension.ws.api.reliablemessaging.ReliableMessagingVersion)2