Search in sources :

Example 11 with DNSServiceImpl

use of org.nhindirect.config.service.impl.DNSServiceImpl in project nhin-d by DirectProject.

the class DNSServiceTest method testRemoveDNSByRecordId.

/**
     * Test the removeDNSByRecordId method.
     */
public void testRemoveDNSByRecordId() {
    final DNSDao dnsDao = context.mock(DNSDao.class);
    final long recId = 8387;
    context.checking(new Expectations() {

        {
            oneOf(dnsDao).remove(recId);
        }
    });
    DNSServiceImpl service = new DNSServiceImpl();
    service.setDao(dnsDao);
    try {
        service.removeDNSByRecordId(recId);
    } catch (Exception e) {
        fail("Exception thrown");
    }
}
Also used : Expectations(org.jmock.Expectations) DNSDao(org.nhindirect.config.store.dao.DNSDao) DNSServiceImpl(org.nhindirect.config.service.impl.DNSServiceImpl)

Aggregations

Expectations (org.jmock.Expectations)11 DNSServiceImpl (org.nhindirect.config.service.impl.DNSServiceImpl)11 DNSDao (org.nhindirect.config.store.dao.DNSDao)11 DNSRecord (org.nhindirect.config.store.DNSRecord)3