Search in sources :

Example 6 with ControlledBounceProxyInformation

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

the class MonitoringServiceImplTest method testRegisterBounceProxy.

@Test
public void testRegisterBounceProxy() {
    Mockito.when(bpDirectoryMock.containsBounceProxy("X.Y")).thenReturn(false);
    monitoringService.register("X.Y", "http://www.joynX.de/bp", "http://joyn.some-internal-server.de/bpX");
    Mockito.verify(bpDirectoryMock).addBounceProxy(new ControlledBounceProxyInformation("X.Y", URI.create("http://www.joynX.de/bp"), URI.create("http://joyn.some-internal-server.de/bpX")));
}
Also used : ControlledBounceProxyInformation(io.joynr.messaging.info.ControlledBounceProxyInformation) Test(org.junit.Test)

Example 7 with ControlledBounceProxyInformation

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

the class ControlledBounceProxyInformationTest method testNotEqualsDifferentUrlForBpc.

@Test
public void testNotEqualsDifferentUrlForBpc() {
    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://joynA.bmwgroup.net"));
    Assert.assertFalse(bpInfo1.equals(bpInfo2));
}
Also used : ControlledBounceProxyInformation(io.joynr.messaging.info.ControlledBounceProxyInformation) Test(org.junit.Test)

Example 8 with ControlledBounceProxyInformation

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

the class ControlledBounceProxyInformationTest method testNotEqualsDifferentClusterId.

@Test
public void testNotEqualsDifferentClusterId() {
    ControlledBounceProxyInformation bpInfo1 = new ControlledBounceProxyInformation("X", "Y", URI.create("http://www.joynX.de"), URI.create("http://joynX.bmwgroup.net"));
    ControlledBounceProxyInformation bpInfo2 = new ControlledBounceProxyInformation("X", "B", 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 9 with ControlledBounceProxyInformation

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

the class ControlledBounceProxyInformationTest method testConstructorWithClusterAndInstance.

@Test
public void testConstructorWithClusterAndInstance() {
    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 10 with ControlledBounceProxyInformation

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

the class ControlledBounceProxyInformationTest method testEqualsForSameReferences.

@Test
public void testEqualsForSameReferences() {
    ControlledBounceProxyInformation bpInfo1 = new ControlledBounceProxyInformation("X", "Y", URI.create("http://www.joynX.de"), URI.create("http://joynX.bmwgroup.net"));
    Assert.assertTrue(bpInfo1.equals(bpInfo1));
}
Also used : ControlledBounceProxyInformation(io.joynr.messaging.info.ControlledBounceProxyInformation) 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