Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Sep 6, 2023
1 parent af2ade8 commit 808d18d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
28 changes: 28 additions & 0 deletions core/src/test/java/ch/cyberduck/core/NullDeleteFeature.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package ch.cyberduck.core;/*
* Copyright (c) 2002-2023 iterate GmbH. All rights reserved.
* https://cyberduck.io/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/

import ch.cyberduck.core.exception.BackgroundException;
import ch.cyberduck.core.features.Delete;
import ch.cyberduck.core.transfer.TransferStatus;

import java.util.Map;

public class NullDeleteFeature implements Delete {

@Override
public void delete(final Map<Path, TransferStatus> files, final PasswordCallback prompt, final Callback callback) throws BackgroundException {

}
}
4 changes: 4 additions & 0 deletions core/src/test/java/ch/cyberduck/core/NullSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import ch.cyberduck.core.exception.BackgroundException;
import ch.cyberduck.core.exception.LoginCanceledException;
import ch.cyberduck.core.features.Delete;
import ch.cyberduck.core.features.Directory;
import ch.cyberduck.core.features.Move;
import ch.cyberduck.core.features.Read;
Expand Down Expand Up @@ -56,6 +57,9 @@ public <T> T _getFeature(Class<T> type) {
if(type == Move.class) {
return (T) new NullMoveFeature();
}
if(type == Delete.class) {
return (T) new NullDeleteFeature();
}
if(type == Directory.class) {
return (T) new NullDirectoryFeature();
}
Expand Down

0 comments on commit 808d18d

Please sign in to comment.