Search in sources :

Example 1 with Trip

use of joynr.types.Localisation.Trip in project joynr by bmwcarit.

the class AbstractProviderProxyEnd2EndTest method sendObjectsAsArgumentAndReturnValue.

@Test(timeout = CONST_DEFAULT_TEST_TIMEOUT)
public void sendObjectsAsArgumentAndReturnValue() throws DiscoveryException, JoynrIllegalStateException, InterruptedException {
    ProxyBuilder<testProxy> proxyBuilder = consumerRuntime.getProxyBuilder(domain, testProxy.class);
    testProxy proxy = proxyBuilder.setMessagingQos(messagingQos).setDiscoveryQos(discoveryQos).build();
    List<GpsLocation> locationList = new ArrayList<GpsLocation>();
    locationList.add(new GpsLocation(50.1, 20.1, 500.0, GpsFixEnum.MODE3D, 0.0, 0.0, 0.0, 0.0, 0l, 0l, 1000));
    locationList.add(new GpsLocation(50.1, 20.1, 500.0, GpsFixEnum.MODE3D, 0.0, 0.0, 0.0, 0.0, 0l, 0l, 1000));
    locationList.add(new GpsLocation(50.1, 20.1, 500.0, GpsFixEnum.MODE3D, 0.0, 0.0, 0.0, 0.0, 0l, 0l, 1000));
    Trip testObject = new Trip(locationList.toArray(new GpsLocation[0]), "Title");
    Trip result;
    result = proxy.optimizeTrip(testObject);
    assertEquals(Double.valueOf(500.0), result.getLocations()[0].getAltitude());
}
Also used : Trip(joynr.types.Localisation.Trip) joynr.tests.testProxy(joynr.tests.testProxy) ArrayList(java.util.ArrayList) GpsLocation(joynr.types.Localisation.GpsLocation) Test(org.junit.Test)

Aggregations

ArrayList (java.util.ArrayList)1 joynr.tests.testProxy (joynr.tests.testProxy)1 GpsLocation (joynr.types.Localisation.GpsLocation)1 Trip (joynr.types.Localisation.Trip)1 Test (org.junit.Test)1