@Test(expected = IllegalNullArgumentException.class) public void renameFile_from_null() throws IOException { UpdateOperationWithCacheFileTask.renameFile(null, folder.newFile()); }
protected static void renameFile(@Nonnull final File from, @Nonnull final File to) { Check.notNull(from, "from"); Check.stateIsTrue(from.exists(), "Argument 'from' must not be an existing file."); Check.notNull(to, "to"); Check.stateIsTrue(from.renameTo(to), "Renaming file from '%s' to '%s' failed.", from.getAbsolutePath(), to.getAbsolutePath()); }
UpdateOperationWithCacheFileTask extends AbstractUpdateOperation { protected static void renameFile(@Nonnull final File from, @Nonnull final File to) { Check.notNull(from, "from"); Check.stateIsTrue(from.exists(), "Argument 'from' must not be an existing file."); Check.notNull(to, "to"); Check.stateIsTrue(from.renameTo(to), "Renaming file from '%s' to '%s' failed.", from.getAbsolutePath(), to.getAbsolutePath()); } }
UpdateOperationWithCacheFileTask extends AbstractUpdateOperation { protected static void renameFile(@Nonnull final File from, @Nonnull final File to) { Check.notNull(from, "from"); Check.stateIsTrue(from.exists(), "Argument 'from' must not be an existing file."); Check.notNull(to, "to"); Check.stateIsTrue(from.renameTo(to), "Renaming file from '%s' to '%s' failed.", from.getAbsolutePath(), to.getAbsolutePath()); } UpdateOperationWithCacheFileTask(@Nonnull final AbstractRefreshableDataStore dataStore, @Nonnull final File cacheFile); }
UpdateOperationWithCacheFileTask extends AbstractUpdateOperation { protected static void renameFile(@Nonnull final File from, @Nonnull final File to) { Check.notNull(from, "from"); Check.stateIsTrue(from.exists(), "Argument 'from' must not be an existing file."); Check.notNull(to, "to"); Check.stateIsTrue(from.renameTo(to), "Renaming file from '%s' to '%s' failed.", from.getAbsolutePath(), to.getAbsolutePath()); } UpdateOperationWithCacheFileTask(@Nonnull final AbstractRefreshableDataStore dataStore, @Nonnull final File cacheFile); @Override void call(); }
UpdateOperationWithCacheFileTask extends AbstractUpdateOperation { protected static void renameFile(@Nonnull final File from, @Nonnull final File to) { Check.notNull(from, "from"); Check.stateIsTrue(from.exists(), "Argument 'from' must not be an existing file."); Check.notNull(to, "to"); Check.stateIsTrue(from.renameTo(to), "Renaming file from '%s' to '%s' failed.", from.getAbsolutePath(), to.getAbsolutePath()); } UpdateOperationWithCacheFileTask(@Nonnull final AbstractRefreshableDataStore dataStore, @Nonnull final File cacheFile); @Override void call();  }