Moved test utility classes into test package.

This commit is contained in:
akwizgran
2016-12-14 15:42:41 +00:00
parent 1081a08ea9
commit 3c2428449d
129 changed files with 275 additions and 288 deletions

View File

@@ -1,6 +1,6 @@
package org.briarproject.bramble.plugin.file;
import org.briarproject.bramble.BrambleTestCase;
import org.briarproject.bramble.test.BrambleTestCase;
import org.junit.Test;
import static org.junit.Assert.assertEquals;

View File

@@ -1,6 +1,6 @@
package org.briarproject.bramble.plugin.file;
import org.briarproject.bramble.BrambleTestCase;
import org.briarproject.bramble.test.BrambleTestCase;
import org.junit.Test;
import static org.junit.Assert.assertEquals;

View File

@@ -1,8 +1,8 @@
package org.briarproject.bramble.plugin.file;
import org.briarproject.bramble.BrambleTestCase;
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
import org.briarproject.bramble.plugin.file.RemovableDriveMonitor.Callback;
import org.briarproject.bramble.test.BrambleTestCase;
import org.junit.Test;
import java.io.File;
@@ -41,7 +41,7 @@ public class PollingRemovableDriveMonitorTest extends BrambleTestCase {
};
// Create a callback that waits for two files
final CountDownLatch latch = new CountDownLatch(2);
final List<File> detected = new ArrayList<File>();
final List<File> detected = new ArrayList<>();
@NotNullByDefault
Callback callback = new Callback() {

View File

@@ -1,12 +1,12 @@
package org.briarproject.bramble.plugin.file;
import org.briarproject.bramble.BrambleTestCase;
import org.briarproject.bramble.ImmediateExecutor;
import org.briarproject.bramble.TestUtils;
import org.briarproject.bramble.api.contact.ContactId;
import org.briarproject.bramble.api.plugin.TransportConnectionWriter;
import org.briarproject.bramble.api.plugin.simplex.SimplexPluginCallback;
import org.briarproject.bramble.plugin.file.RemovableDriveMonitor.Callback;
import org.briarproject.bramble.test.BrambleTestCase;
import org.briarproject.bramble.test.ImmediateExecutor;
import org.briarproject.bramble.test.TestUtils;
import org.jmock.Expectations;
import org.jmock.Mockery;
import org.jmock.lib.concurrent.Synchroniser;
@@ -73,7 +73,7 @@ public class RemovableDrivePluginTest extends BrambleTestCase {
public void testWriterIsNullIfNoDriveIsChosen() throws Exception {
final File drive1 = new File(testDir, "1");
final File drive2 = new File(testDir, "2");
final List<File> drives = new ArrayList<File>();
final List<File> drives = new ArrayList<>();
drives.add(drive1);
drives.add(drive2);
@@ -112,7 +112,7 @@ public class RemovableDrivePluginTest extends BrambleTestCase {
public void testWriterIsNullIfOutputDirDoesNotExist() throws Exception {
final File drive1 = new File(testDir, "1");
final File drive2 = new File(testDir, "2");
final List<File> drives = new ArrayList<File>();
final List<File> drives = new ArrayList<>();
drives.add(drive1);
drives.add(drive2);
@@ -151,7 +151,7 @@ public class RemovableDrivePluginTest extends BrambleTestCase {
public void testWriterIsNullIfOutputDirIsAFile() throws Exception {
final File drive1 = new File(testDir, "1");
final File drive2 = new File(testDir, "2");
final List<File> drives = new ArrayList<File>();
final List<File> drives = new ArrayList<>();
drives.add(drive1);
drives.add(drive2);
// Create drive1 as a file rather than a directory
@@ -192,7 +192,7 @@ public class RemovableDrivePluginTest extends BrambleTestCase {
public void testWriterIsNotNullIfOutputDirIsADir() throws Exception {
final File drive1 = new File(testDir, "1");
final File drive2 = new File(testDir, "2");
final List<File> drives = new ArrayList<File>();
final List<File> drives = new ArrayList<>();
drives.add(drive1);
drives.add(drive2);
// Create drive1 as a directory
@@ -236,7 +236,7 @@ public class RemovableDrivePluginTest extends BrambleTestCase {
public void testWritingToWriter() throws Exception {
final File drive1 = new File(testDir, "1");
final File drive2 = new File(testDir, "2");
final List<File> drives = new ArrayList<File>();
final List<File> drives = new ArrayList<>();
drives.add(drive1);
drives.add(drive2);
// Create drive1 as a directory

View File

@@ -1,9 +1,9 @@
package org.briarproject.bramble.plugin.file;
import org.briarproject.bramble.BrambleTestCase;
import org.briarproject.bramble.TestUtils;
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
import org.briarproject.bramble.plugin.file.RemovableDriveMonitor.Callback;
import org.briarproject.bramble.test.BrambleTestCase;
import org.briarproject.bramble.test.TestUtils;
import org.briarproject.bramble.util.OsUtils;
import org.junit.After;
import org.junit.Before;
@@ -61,7 +61,7 @@ public class UnixRemovableDriveMonitorTest extends BrambleTestCase {
return;
}
// Create a callback that will wait for two files before stopping
final List<File> detected = new ArrayList<File>();
final List<File> detected = new ArrayList<>();
final CountDownLatch latch = new CountDownLatch(2);
@NotNullByDefault
final Callback callback = new Callback() {

View File

@@ -1,6 +1,6 @@
package org.briarproject.bramble.plugin.modem;
import org.briarproject.bramble.BrambleTestCase;
import org.briarproject.bramble.test.BrambleTestCase;
import org.junit.Test;
import static org.junit.Assert.assertEquals;

View File

@@ -1,9 +1,9 @@
package org.briarproject.bramble.plugin.modem;
import org.briarproject.bramble.BrambleTestCase;
import org.briarproject.bramble.api.contact.ContactId;
import org.briarproject.bramble.api.plugin.duplex.DuplexPluginCallback;
import org.briarproject.bramble.api.properties.TransportProperties;
import org.briarproject.bramble.test.BrambleTestCase;
import org.jmock.Expectations;
import org.jmock.Mockery;
import org.junit.Test;