Added project filesystem-invariants-tests

* Implemented some tests to be run on multiple implementations to
demonstrate how such tests can be implemented
* Detected problems with CryptoFileSystem(NioFileSystem)
* Made CryptoFileSystem and CryptorImpl public / constructible from
other packages
This commit is contained in:
Markus Kreusch
2016-01-06 01:49:15 +01:00
parent 801253aa27
commit 3f44d9bb66
7 changed files with 226 additions and 2 deletions

View File

@@ -43,7 +43,7 @@ public class CryptorImpl implements Cryptor {
private final AtomicReference<FileContentCryptor> fileContentCryptor = new AtomicReference<>();
private final SecureRandom randomSource;
CryptorImpl(SecureRandom randomSource) {
public CryptorImpl(SecureRandom randomSource) {
this.randomSource = randomSource;
}

View File

@@ -19,7 +19,7 @@ import org.cryptomator.filesystem.Folder;
import org.cryptomator.filesystem.ReadableFile;
import org.cryptomator.filesystem.WritableFile;
class CryptoFileSystem extends CryptoFolder implements FileSystem {
public class CryptoFileSystem extends CryptoFolder implements FileSystem {
private static final String DATA_ROOT_DIR = "d";
private static final String ROOT_DIR_FILE = "root";