use of org.eclipse.vorto.repository.api.resolver.LWM2MQuery 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.api.resolver.LWM2MQuery 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"))));
}
Aggregations