Search in sources :

Example 1 with BluetoothQuery

use of org.eclipse.vorto.repository.api.resolver.BluetoothQuery in project vorto by eclipse.

the class BlueToothDeviceInfoProfileResolverTest method testResolveInfoModelByDeviceInfoProfileSerialNo.

@Test
public void testResolveInfoModelByDeviceInfoProfileSerialNo() {
    checkinModel("bluetooth/ColorLight.fbmodel");
    checkinModel("bluetooth/ColorLightIM.infomodel");
    checkinModel("bluetooth/ColorLight_bluetooth.mapping");
    DefaultResolver resolver = new DefaultResolver();
    resolver.setRepository(this.modelRepository);
    assertEquals(new ModelId("ColorLightIM", "com.mycompany", "1.0.0"), resolver.resolve(new BluetoothQuery("4810")));
    assertNotNull(this.modelRepository.getById(resolver.resolve(new BluetoothQuery("4810"))));
}
Also used : DefaultResolver(org.eclipse.vorto.repository.core.impl.resolver.DefaultResolver) BluetoothQuery(org.eclipse.vorto.repository.api.resolver.BluetoothQuery) ModelId(org.eclipse.vorto.repository.api.ModelId) AbstractIntegrationTest(org.eclipse.vorto.repository.AbstractIntegrationTest) Test(org.junit.Test)

Aggregations

AbstractIntegrationTest (org.eclipse.vorto.repository.AbstractIntegrationTest)1 ModelId (org.eclipse.vorto.repository.api.ModelId)1 BluetoothQuery (org.eclipse.vorto.repository.api.resolver.BluetoothQuery)1 DefaultResolver (org.eclipse.vorto.repository.core.impl.resolver.DefaultResolver)1 Test (org.junit.Test)1