use of org.eclipse.vorto.repository.core.impl.resolver.DefaultResolver in project vorto by eclipse.
the class Lwm2mObjectIdResolverTest method testResolveResourceId.
@Test
public void testResolveResourceId() {
checkinModel("lwm2m/ColorLight.fbmodel");
checkinModel("lwm2m/ColorLight_lwm2m.mapping");
DefaultResolver lwm2mResolver = new DefaultResolver();
lwm2mResolver.setRepository(this.modelRepository);
assertNull(lwm2mResolver.resolve(new LWM2MQuery("3")));
}
use of org.eclipse.vorto.repository.core.impl.resolver.DefaultResolver in project vorto by eclipse.
the class Lwm2mObjectIdResolverTest method testResolveForExistingObjectId.
@Test
public void testResolveForExistingObjectId() {
checkinModel("lwm2m/ColorLight.fbmodel");
checkinModel("lwm2m/ColorLight_lwm2m.mapping");
DefaultResolver lwm2mResolver = new DefaultResolver();
lwm2mResolver.setRepository(this.modelRepository);
assertEquals(new ModelId("ColorLight", "com.mycompany.fb", "1.0.0"), lwm2mResolver.resolve(new LWM2MQuery("2")));
assertNotNull(this.modelRepository.getById(lwm2mResolver.resolve(new LWM2MQuery("2"))));
}
use of org.eclipse.vorto.repository.core.impl.resolver.DefaultResolver 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"))));
}
Aggregations