コード例 #1
0
 @Before
 public void setup() {
   environment.setConfiguration(configuration);
   environment.setLog(log);
   environment.setSql(sql);
   DaoTestsHelper.setupConfiguration(configuration);
   webGroupDao = new TestableWebGroupDao(environment);
 }
コード例 #2
0
  @Before
  public void setup()
      throws MalformedURLException, InstantiationException, IllegalAccessException, SQLException {
    environment.setConfiguration(configuration);
    environment.setLog(log);
    environment.setSql(sql);
    DaoTestsHelper.setupConfiguration(configuration);

    webGroupDao = new SingleWebGroupDao(environment);

    when(sql.sqlQuery(anyString())).thenReturn(result);
    when(result.next()).thenReturn(true, false);
  }