@Test public void testExists() throws Exception { File passwordFile = new File(applicationDirectories.getWorkDirectory(), "admin.password"); assertThat(underTest.exists(), is(false)); Files.write(passwordFile.toPath(), "testpass".getBytes("UTF-8")); assertThat(underTest.exists(), is(true)); passwordFile.delete(); assertThat(underTest.exists(), is(false)); }
@Override public boolean exists() { return adminPasswordFile.exists(); }
AdminPasswordFileManagerImpl extends ComponentSupport implements AdminPasswordFileManager { @Override public boolean exists() { return adminPasswordFile.exists(); } }
AdminPasswordFileManagerImpl extends ComponentSupport implements AdminPasswordFileManager { @Override public boolean exists() { return adminPasswordFile.exists(); } @Inject  AdminPasswordFileManagerImpl(final ApplicationDirectories applicationDirectories); }
AdminPasswordFileManagerImpl extends ComponentSupport implements AdminPasswordFileManager { @Override public boolean exists() { return adminPasswordFile.exists(); } @Inject  AdminPasswordFileManagerImpl(final ApplicationDirectories applicationDirectories); @Override boolean writeFile(String password); @Override boolean exists(); @Override String getPath(); @Override String readFile(); @Override void removeFile(); }
AdminPasswordFileManagerImpl extends ComponentSupport implements AdminPasswordFileManager { @Override public boolean exists() { return adminPasswordFile.exists(); } @Inject  AdminPasswordFileManagerImpl(final ApplicationDirectories applicationDirectories); @Override boolean writeFile(String password); @Override boolean exists(); @Override String getPath(); @Override String readFile(); @Override void removeFile(); final ApplicationDirectories applicationDirectories; }