Search in sources :

Example 31 with ControlledBounceProxyInformation

use of io.joynr.messaging.info.ControlledBounceProxyInformation in project joynr by bmwcarit.

the class ControlledBounceProxyInformationTest method testEquals.

@Test
public void testEquals() {
    ControlledBounceProxyInformation bpInfo1 = new ControlledBounceProxyInformation("X", "Y", URI.create("http://www.joynX.de"), URI.create("http://joynX.bmwgroup.net"));
    ControlledBounceProxyInformation bpInfo2 = new ControlledBounceProxyInformation("X", "Y", URI.create("http://www.joynX.de"), URI.create("http://joynX.bmwgroup.net"));
    Assert.assertTrue(bpInfo1.equals(bpInfo2));
}
Also used : ControlledBounceProxyInformation(io.joynr.messaging.info.ControlledBounceProxyInformation) Test(org.junit.Test)

Example 32 with ControlledBounceProxyInformation

use of io.joynr.messaging.info.ControlledBounceProxyInformation in project joynr by bmwcarit.

the class ControlledBounceProxyInformationTest method testNotEqualsDifferentUrlForCc.

@Test
public void testNotEqualsDifferentUrlForCc() {
    ControlledBounceProxyInformation bpInfo1 = new ControlledBounceProxyInformation("X", "Y", URI.create("http://www.joynX.de"), URI.create("http://joynX.bmwgroup.net"));
    ControlledBounceProxyInformation bpInfo2 = new ControlledBounceProxyInformation("X", "Y", URI.create("http://www.joynA.de"), URI.create("http://joynX.bmwgroup.net"));
    Assert.assertFalse(bpInfo1.equals(bpInfo2));
}
Also used : ControlledBounceProxyInformation(io.joynr.messaging.info.ControlledBounceProxyInformation) Test(org.junit.Test)

Example 33 with ControlledBounceProxyInformation

use of io.joynr.messaging.info.ControlledBounceProxyInformation in project joynr by bmwcarit.

the class ControlledBounceProxyInformationTest method testConstructorWithBpId.

@Test
public void testConstructorWithBpId() {
    ControlledBounceProxyInformation bpInfo = new ControlledBounceProxyInformation("cluster0.instance0", URI.create("http://joyn.baseuri.io"));
    Assert.assertEquals("cluster0.instance0", bpInfo.getId());
    Assert.assertEquals("instance0", bpInfo.getInstanceId());
    Assert.assertEquals("http://joyn.baseuri.io", bpInfo.getLocation().toString());
}
Also used : ControlledBounceProxyInformation(io.joynr.messaging.info.ControlledBounceProxyInformation) Test(org.junit.Test)

Example 34 with ControlledBounceProxyInformation

use of io.joynr.messaging.info.ControlledBounceProxyInformation in project joynr by bmwcarit.

the class ControlledBounceProxyInformationTest method testNotEqualsDifferentInstanceId.

@Test
public void testNotEqualsDifferentInstanceId() {
    ControlledBounceProxyInformation bpInfo1 = new ControlledBounceProxyInformation("X", "Y", URI.create("http://www.joynX.de"), URI.create("http://joynX.bmwgroup.net"));
    ControlledBounceProxyInformation bpInfo2 = new ControlledBounceProxyInformation("A", "Y", URI.create("http://www.joynX.de"), URI.create("http://joynX.bmwgroup.net"));
    Assert.assertFalse(bpInfo1.equals(bpInfo2));
}
Also used : ControlledBounceProxyInformation(io.joynr.messaging.info.ControlledBounceProxyInformation) Test(org.junit.Test)

Example 35 with ControlledBounceProxyInformation

use of io.joynr.messaging.info.ControlledBounceProxyInformation in project joynr by bmwcarit.

the class ChannelUrlUtilTest method testGetChannelUrlPathWithDifferentBaseUri.

@Test
public void testGetChannelUrlPathWithDifferentBaseUri() {
    ControlledBounceProxyInformation bpInfo = new ControlledBounceProxyInformation("X.Y", URI.create("http://www.joyn1.de/bp"));
    URI result = ChannelUrlUtil.createChannelLocation(bpInfo, "channel-123", URI.create("http://bp.joynX.de/channels/channel-123"));
    Assert.assertEquals("http://bp.joynX.de/channels/channel-123;jsessionid=.Y", result.toString());
}
Also used : ControlledBounceProxyInformation(io.joynr.messaging.info.ControlledBounceProxyInformation) URI(java.net.URI) Test(org.junit.Test)

Aggregations

ControlledBounceProxyInformation (io.joynr.messaging.info.ControlledBounceProxyInformation)47 Test (org.junit.Test)44 BounceProxyRecord (io.joynr.messaging.bounceproxy.controller.directory.BounceProxyRecord)13 IsCreateChannelHttpRequest (io.joynr.messaging.bounceproxy.IsCreateChannelHttpRequest)5 JoynrProtocolException (io.joynr.messaging.bounceproxy.controller.exception.JoynrProtocolException)5 BounceProxyStatusInformation (io.joynr.messaging.info.BounceProxyStatusInformation)5 Channel (io.joynr.messaging.info.Channel)5 HttpResponse (org.apache.http.HttpResponse)5 HttpContext (org.apache.http.protocol.HttpContext)5 URI (java.net.URI)4 BounceProxyInformation (io.joynr.messaging.info.BounceProxyInformation)2 BounceProxyStatus (io.joynr.messaging.info.BounceProxyStatus)2 PerformanceMeasures (io.joynr.messaging.info.PerformanceMeasures)2 JoynrCommunicationException (io.joynr.exceptions.JoynrCommunicationException)1 JoynrRuntimeException (io.joynr.exceptions.JoynrRuntimeException)1 IOException (java.io.IOException)1 EntityManager (javax.persistence.EntityManager)1 EntityTransaction (javax.persistence.EntityTransaction)1 Query (javax.persistence.Query)1 HttpException (org.apache.http.HttpException)1