Package wicket.contrib.phonebook

Examples of wicket.contrib.phonebook.ContactDao


/**
* @author Kare Nuorteva
*/
public class DetachableContactModelTest extends TestCase {
  public void testLoad() throws Exception {
    ContactDao dao = EasyMock.createMock(ContactDao.class);
    Contact expected = new Contact();
    expected.setId(007);
    expected.setFirstname("James");
    expected.setLastname("Bond");
    expected.setEmail("james.bond@mi5.gov.uk");
    EasyMock.expect(dao.load(expected.getId())).andReturn(expected);
    EasyMock.replay(dao);
    DetachableContactModel model = new DetachableContactModel(expected, dao);
    assertEquals(expected, model.load());
    EasyMock.verify(dao);
  }
View Full Code Here


public class DetachableContactModelTest extends Assert
{
    @Test
  public void testLoad() throws Exception
  {
    ContactDao dao = EasyMock.createMock(ContactDao.class);
    Contact expected = new Contact();
    expected.setId(007);
    expected.setFirstname("James");
    expected.setLastname("Bond");
    expected.setEmail("james.bond@mi5.gov.uk");
    EasyMock.expect(dao.load(expected.getId())).andReturn(expected);
    EasyMock.replay(dao);
    DetachableContactModel model = new DetachableContactModel(expected, dao);
    assertEquals(expected, model.load());
    EasyMock.verify(dao);
  }
View Full Code Here

TOP

Related Classes of wicket.contrib.phonebook.ContactDao

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.