@Test public void shouldRequireHmcResetForNewExtension() throws Exception { givenExtensionIsNotInRepository(EXTENSION_WITH_ITEMS_XML); boolean hmcResetRequired = fireflyExtension.isHmcResetRequired(); assertTrue(hmcResetRequired); }
public boolean isHmcResetRequired() { try { FireflyExtensionModel fireflyExtensionModel = fireflyExtensionRepository.findByName(name); return !containsHmcDefinitionHash(getHmcDefinitionHash(), relaxedMode ? fireflyExtensionModel.getStates() : asList(getLastState(fireflyExtensionModel))); } catch (FireflyExtensionRepository.FireflyExtensionNotFoundException e) { return true; } }
FireflyExtension { public boolean isHmcResetRequired() { try { FireflyExtensionModel fireflyExtensionModel = fireflyExtensionRepository.findByName(name); return !containsHmcDefinitionHash(getHmcDefinitionHash(), relaxedMode ? fireflyExtensionModel.getStates() : asList(getLastState(fireflyExtensionModel))); } catch (FireflyExtensionRepository.FireflyExtensionNotFoundException e) { return true; } } }
FireflyExtension { public boolean isHmcResetRequired() { try { FireflyExtensionModel fireflyExtensionModel = fireflyExtensionRepository.findByName(name); return !containsHmcDefinitionHash(getHmcDefinitionHash(), relaxedMode ? fireflyExtensionModel.getStates() : asList(getLastState(fireflyExtensionModel))); } catch (FireflyExtensionRepository.FireflyExtensionNotFoundException e) { return true; } } FireflyExtension(String name, File rootPath, FireflyExtensionRepository fireflyExtensionRepository, MigrationRepository migrationRepository, boolean relaxedMode); }
FireflyExtension { public boolean isHmcResetRequired() { try { FireflyExtensionModel fireflyExtensionModel = fireflyExtensionRepository.findByName(name); return !containsHmcDefinitionHash(getHmcDefinitionHash(), relaxedMode ? fireflyExtensionModel.getStates() : asList(getLastState(fireflyExtensionModel))); } catch (FireflyExtensionRepository.FireflyExtensionNotFoundException e) { return true; } } FireflyExtension(String name, File rootPath, FireflyExtensionRepository fireflyExtensionRepository, MigrationRepository migrationRepository, boolean relaxedMode); boolean isUpdateRequired(); boolean isHmcResetRequired(); void onHmcReset(PK migration); void onUpdate(PK migration); @Override String toString(); }
FireflyExtension { public boolean isHmcResetRequired() { try { FireflyExtensionModel fireflyExtensionModel = fireflyExtensionRepository.findByName(name); return !containsHmcDefinitionHash(getHmcDefinitionHash(), relaxedMode ? fireflyExtensionModel.getStates() : asList(getLastState(fireflyExtensionModel))); } catch (FireflyExtensionRepository.FireflyExtensionNotFoundException e) { return true; } } FireflyExtension(String name, File rootPath, FireflyExtensionRepository fireflyExtensionRepository, MigrationRepository migrationRepository, boolean relaxedMode); boolean isUpdateRequired(); boolean isHmcResetRequired(); void onHmcReset(PK migration); void onUpdate(PK migration); @Override String toString();  }