use of org.eclipse.californium.core.WebLink in project mule-coap-connector by teslanet-nl.
the class DynamicResourcesTest method testWellKnownCore.
@Test
public void testWellKnownCore() {
assertEquals("wrong number of weblinks", 15, links.size());
WebLink link = links.get("/.well-known/core");
assertNotNull("/.well-known/core is missing", link);
}
use of org.eclipse.californium.core.WebLink in project mule-coap-connector by teslanet-nl.
the class DynamicResourcesTest method additionalSetUp.
@Before
public void additionalSetUp() {
setClientUri("/service/add_resources");
try {
// post to create resource on server
client.post("nothing important", 0);
Set<WebLink> response = client.discover();
links = new HashMap<String, WebLink>();
for (WebLink link : response) {
links.put(link.getURI(), link);
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
use of org.eclipse.californium.core.WebLink in project mule-coap-connector by teslanet-nl.
the class DynamicResourcesTest method testObs.
@Test
public void testObs() {
WebLink link = links.get("/service/resource2_with_obs");
assertNotNull("/service/resource2_with_obs is missing", link);
boolean obs = link.getAttributes().hasObservable();
assertTrue("obs not true", obs);
}
use of org.eclipse.californium.core.WebLink in project mule-coap-connector by teslanet-nl.
the class DynamicResourcesTest method testTitle.
@Test
public void testTitle() {
WebLink link = links.get("/service/resource2_with_title");
assertNotNull("/service/resource2_with_title is missing", link);
String title = link.getAttributes().getTitle();
assertEquals("title has wrong value", "another resource with a title", title);
}
use of org.eclipse.californium.core.WebLink in project mule-coap-connector by teslanet-nl.
the class StaticResourcesTest method testWellKnownCore.
@Test
public void testWellKnownCore() {
assertEquals("wrong number of weblinks", 9, links.size());
WebLink link = links.get("/.well-known/core");
assertNotNull("/.well-known/core is missing", link);
}
Aggregations