Esempio n. 1
0
  @Test
  public void testGettersAndSetters() throws Exception {
    CustomerDAO dao = new CustomerDAO();
    ITransactionManager txMgr = EasyMock.createStrictMock(ITransactionManager.class);
    IConfiguration configuration = EasyMock.createStrictMock(IConfiguration.class);

    dao.setTransactionManager(txMgr);
    dao.setConfiguration(configuration);

    assertEquals("Wrong transaction manager.", txMgr, dao.getTransactionManager());
    assertEquals("Wrong customer service.", configuration, dao.getConfiguration());
  }
Esempio n. 2
0
 @Test
 public void testConstructor() throws Exception {
   CustomerDAO dao = new CustomerDAO();
   assertNull("txManager should be null.", dao.getTransactionManager());
 }