use of org.nhindirect.config.store.dao.AddressDao in project nhin-d by DirectProject.
the class AddressServiceTest method testUpdateAddress.
/**
* Test the updateAddress method.
*/
public void testUpdateAddress() {
final AddressDao addressDao = context.mock(AddressDao.class);
final Address address = new Address();
context.checking(new Expectations() {
{
// TODO
}
});
AddressServiceImpl service = new AddressServiceImpl();
service.setDao(addressDao);
try {
service.updateAddress(address);
} catch (Exception e) {
fail("Exception thrown");
}
}
use of org.nhindirect.config.store.dao.AddressDao in project nhin-d by DirectProject.
the class AddressServiceTest method testAddAddress.
/**
* Test the addAddress method.
*/
public void testAddAddress() {
final AddressDao addressDao = context.mock(AddressDao.class);
final Collection<Address> addresses = Arrays.asList(new Address(new Domain("healthdomain.com"), "beau@healthdomain.com"), new Address(new Domain("healthdomain2.com"), "beau@healthdomain2.com"));
context.checking(new Expectations() {
{
// TODO
}
});
AddressServiceImpl service = new AddressServiceImpl();
service.setDao(addressDao);
try {
service.addAddress(addresses);
} catch (Exception e) {
fail("Exception thrown");
}
}
use of org.nhindirect.config.store.dao.AddressDao in project nhin-d by DirectProject.
the class AddressServiceTest method testListAddresss.
/**
* Test the listAddresss method.
*/
public void testListAddresss() {
final AddressDao addressDao = context.mock(AddressDao.class);
final String lastAddressName = "lastAddressName.com";
final int maxResults = 7;
context.checking(new Expectations() {
{
// TODO
}
});
AddressServiceImpl service = new AddressServiceImpl();
service.setDao(addressDao);
try {
service.listAddresss(lastAddressName, maxResults);
} catch (Exception e) {
fail("Exception thrown");
}
}
Aggregations