@Test public void setSystemInitializedTest() { SystemStatusRepository systemStatusRepository = new MockSystemStatusRepository(Boolean.FALSE); DefaultSystemStatusAccessor systemStatusUtility = new DefaultSystemStatusAccessor(systemStatusRepository); systemStatusUtility.setSystemInitialized(Boolean.TRUE); SystemStatusEntity testSystemStatus = systemStatusRepository.findAll().get(0); assertTrue(testSystemStatus.isInitialConfigurationPerformed()); }
@Override @Transactional public void setSystemInitialized(boolean systemInitialized) { SystemStatusEntity systemStatus = getSystemStatus(); SystemStatusEntity newSystemStatus = new SystemStatusEntity(systemInitialized, systemStatus.getStartupTime()); updateSystemStatus(newSystemStatus); }
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public void setSystemInitialized(boolean systemInitialized) { SystemStatusEntity systemStatus = getSystemStatus(); SystemStatusEntity newSystemStatus = new SystemStatusEntity(systemInitialized, systemStatus.getStartupTime()); updateSystemStatus(newSystemStatus); } }
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public void setSystemInitialized(boolean systemInitialized) { SystemStatusEntity systemStatus = getSystemStatus(); SystemStatusEntity newSystemStatus = new SystemStatusEntity(systemInitialized, systemStatus.getStartupTime()); updateSystemStatus(newSystemStatus); } @Autowired  DefaultSystemStatusAccessor(SystemStatusRepository systemStatusRepository); }
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public void setSystemInitialized(boolean systemInitialized) { SystemStatusEntity systemStatus = getSystemStatus(); SystemStatusEntity newSystemStatus = new SystemStatusEntity(systemInitialized, systemStatus.getStartupTime()); updateSystemStatus(newSystemStatus); } @Autowired  DefaultSystemStatusAccessor(SystemStatusRepository systemStatusRepository); @Override @Transactional boolean isSystemInitialized(); @Override @Transactional void setSystemInitialized(boolean systemInitialized); @Override @Transactional void startupOccurred(); @Override @Transactional OffsetDateTime getStartupTime(); }
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public void setSystemInitialized(boolean systemInitialized) { SystemStatusEntity systemStatus = getSystemStatus(); SystemStatusEntity newSystemStatus = new SystemStatusEntity(systemInitialized, systemStatus.getStartupTime()); updateSystemStatus(newSystemStatus); } @Autowired  DefaultSystemStatusAccessor(SystemStatusRepository systemStatusRepository); @Override @Transactional boolean isSystemInitialized(); @Override @Transactional void setSystemInitialized(boolean systemInitialized); @Override @Transactional void startupOccurred(); @Override @Transactional OffsetDateTime getStartupTime(); static final Long SYSTEM_STATUS_ID; }