Search in sources :

Example 1 with DnsSdDiscoveryAdvertiser

use of org.eclipse.ecf.provider.dnssd.DnsSdDiscoveryAdvertiser in project ecf by eclipse.

the class DnsSdAdvertiserServiceTest method testRegisterServiceWithoutHostKey.

/**
 * Tests that a register is handled correctly when no key is present
 * for that domain and the underlying ddns call fails
 * @throws ContainerConnectException
 */
public void testRegisterServiceWithoutHostKey() throws ContainerConnectException {
    final DnsSdDiscoveryAdvertiser advertiser = new DnsSdDiscoveryAdvertiser();
    advertiser.connect(null, null);
    try {
        advertiser.registerService(serviceInfo);
    } catch (ECFRuntimeException e) {
        advertiser.disconnect();
        return;
    }
    fail("Register should have failed without a host key given.");
}
Also used : DnsSdDiscoveryAdvertiser(org.eclipse.ecf.provider.dnssd.DnsSdDiscoveryAdvertiser) ECFRuntimeException(org.eclipse.ecf.core.util.ECFRuntimeException)

Aggregations

ECFRuntimeException (org.eclipse.ecf.core.util.ECFRuntimeException)1 DnsSdDiscoveryAdvertiser (org.eclipse.ecf.provider.dnssd.DnsSdDiscoveryAdvertiser)1