Search in sources :

Example 1 with BluetoothQuery

use of org.eclipse.vorto.repository.web.core.dto.BluetoothQuery in project vorto by eclipse.

the class BlueToothDeviceInfoProfileResolverTest method testResolveInfoModelByDeviceInfoProfileSerialNo.

@Test
public void testResolveInfoModelByDeviceInfoProfileSerialNo() {
    importModel("bluetooth/ColorLight.fbmodel");
    importModel("bluetooth/ColorLightIM.infomodel");
    importModel("bluetooth/ColorLight_bluetooth.mapping");
    DefaultResolver resolver = new DefaultResolver();
    resolver.setRepositoryFactory(repositoryFactory);
    resolver.setSearchService(searchService);
    assertEquals(new ModelId("ColorLightIM", "com.mycompany", "1.0.0"), resolver.resolve(new BluetoothQuery("4810")));
    assertNotNull(repositoryFactory.getRepository(createUserContext("admin")).getById(resolver.resolve(new BluetoothQuery("4810"))));
}
Also used : DefaultResolver(org.eclipse.vorto.repository.core.impl.resolver.DefaultResolver) BluetoothQuery(org.eclipse.vorto.repository.web.core.dto.BluetoothQuery) ModelId(org.eclipse.vorto.model.ModelId) Test(org.junit.Test)

Aggregations

ModelId (org.eclipse.vorto.model.ModelId)1 DefaultResolver (org.eclipse.vorto.repository.core.impl.resolver.DefaultResolver)1 BluetoothQuery (org.eclipse.vorto.repository.web.core.dto.BluetoothQuery)1 Test (org.junit.Test)1