@Test public void testExecuteDMLUpdates() throws Exception { setupIoCContext(); Method addMissingConfigs = UpgradeCatalog212.class.getDeclaredMethod("addMissingConfigs"); Method addNewConfigurationsFromXml = AbstractUpgradeCatalog.class.getDeclaredMethod("addNewConfigurationsFromXml"); UpgradeCatalog212 upgradeCatalog212 = createMockBuilder(UpgradeCatalog212.class) .addMockedMethod(addNewConfigurationsFromXml) .addMockedMethod(addMissingConfigs) .createMock(); upgradeCatalog212.addNewConfigurationsFromXml(); expectLastCall().once(); upgradeCatalog212.addMissingConfigs(); expectLastCall().once(); replay(upgradeCatalog212); upgradeCatalog212.executeDMLUpdates(); verify(upgradeCatalog212); }
@Override protected void executeDMLUpdates() throws AmbariException, SQLException { addNewConfigurationsFromXml(); addMissingConfigs(); }
UpgradeCatalog212 extends AbstractUpgradeCatalog { @Override protected void executeDMLUpdates() throws AmbariException, SQLException { addNewConfigurationsFromXml(); addMissingConfigs(); } }
UpgradeCatalog212 extends AbstractUpgradeCatalog { @Override protected void executeDMLUpdates() throws AmbariException, SQLException { addNewConfigurationsFromXml(); addMissingConfigs(); } @Inject  UpgradeCatalog212(Injector injector); protected  UpgradeCatalog212(); }
UpgradeCatalog212 extends AbstractUpgradeCatalog { @Override protected void executeDMLUpdates() throws AmbariException, SQLException { addNewConfigurationsFromXml(); addMissingConfigs(); } @Inject  UpgradeCatalog212(Injector injector); protected  UpgradeCatalog212(); @Override String getTargetVersion(); @Override String getSourceVersion(); }
UpgradeCatalog212 extends AbstractUpgradeCatalog { @Override protected void executeDMLUpdates() throws AmbariException, SQLException { addNewConfigurationsFromXml(); addMissingConfigs(); } @Inject  UpgradeCatalog212(Injector injector); protected  UpgradeCatalog212(); @Override String getTargetVersion(); @Override String getSourceVersion();  }