Unverified Commit 3c242844 authored by akwizgran's avatar akwizgran
Browse files

Moved test utility classes into test package.

parent 1081a08e
......@@ -2,7 +2,6 @@ package org.briarproject.briar.sharing;
import net.jodah.concurrentunit.Waiter;
import org.briarproject.bramble.TestDatabaseModule;
import org.briarproject.bramble.api.contact.Contact;
import org.briarproject.bramble.api.db.DbException;
import org.briarproject.bramble.api.db.NoSuchGroupException;
......@@ -10,9 +9,7 @@ import org.briarproject.bramble.api.event.Event;
import org.briarproject.bramble.api.event.EventListener;
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
import org.briarproject.bramble.api.sync.GroupId;
import org.briarproject.briar.BriarIntegrationTest;
import org.briarproject.briar.BriarIntegrationTestComponent;
import org.briarproject.briar.DaggerBriarIntegrationTestComponent;
import org.briarproject.bramble.test.TestDatabaseModule;
import org.briarproject.briar.api.blog.Blog;
import org.briarproject.briar.api.blog.BlogInvitationRequest;
import org.briarproject.briar.api.blog.BlogInvitationResponse;
......@@ -21,6 +18,9 @@ import org.briarproject.briar.api.blog.BlogSharingManager;
import org.briarproject.briar.api.blog.event.BlogInvitationRequestReceivedEvent;
import org.briarproject.briar.api.blog.event.BlogInvitationResponseReceivedEvent;
import org.briarproject.briar.api.sharing.InvitationMessage;
import org.briarproject.briar.test.BriarIntegrationTest;
import org.briarproject.briar.test.BriarIntegrationTestComponent;
import org.briarproject.briar.test.DaggerBriarIntegrationTestComponent;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
......@@ -30,8 +30,8 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import static org.briarproject.briar.BriarTestUtils.assertGroupCount;
import static org.briarproject.briar.api.blog.BlogSharingManager.CLIENT_ID;
import static org.briarproject.briar.test.BriarTestUtils.assertGroupCount;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
......
......@@ -2,7 +2,6 @@ package org.briarproject.briar.sharing;
import net.jodah.concurrentunit.Waiter;
import org.briarproject.bramble.TestDatabaseModule;
import org.briarproject.bramble.api.Bytes;
import org.briarproject.bramble.api.contact.Contact;
import org.briarproject.bramble.api.data.BdfList;
......@@ -13,9 +12,7 @@ import org.briarproject.bramble.api.event.Event;
import org.briarproject.bramble.api.event.EventListener;
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
import org.briarproject.bramble.api.sync.Group;
import org.briarproject.briar.BriarIntegrationTest;
import org.briarproject.briar.BriarIntegrationTestComponent;
import org.briarproject.briar.DaggerBriarIntegrationTestComponent;
import org.briarproject.bramble.test.TestDatabaseModule;
import org.briarproject.briar.api.client.MessageQueueManager;
import org.briarproject.briar.api.client.SessionId;
import org.briarproject.briar.api.forum.Forum;
......@@ -29,6 +26,9 @@ import org.briarproject.briar.api.forum.event.ForumInvitationRequestReceivedEven
import org.briarproject.briar.api.forum.event.ForumInvitationResponseReceivedEvent;
import org.briarproject.briar.api.sharing.InvitationMessage;
import org.briarproject.briar.api.sharing.SharingInvitationItem;
import org.briarproject.briar.test.BriarIntegrationTest;
import org.briarproject.briar.test.BriarIntegrationTestComponent;
import org.briarproject.briar.test.DaggerBriarIntegrationTestComponent;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
......@@ -39,8 +39,8 @@ import java.util.Collection;
import java.util.List;
import static junit.framework.Assert.assertNotNull;
import static org.briarproject.bramble.TestUtils.getRandomBytes;
import static org.briarproject.bramble.TestUtils.getRandomString;
import static org.briarproject.bramble.test.TestUtils.getRandomBytes;
import static org.briarproject.bramble.test.TestUtils.getRandomString;
import static org.briarproject.briar.api.forum.ForumConstants.FORUM_SALT_LENGTH;
import static org.briarproject.briar.api.forum.ForumSharingManager.CLIENT_ID;
import static org.briarproject.briar.api.sharing.SharingConstants.SHARE_MSG_TYPE_INVITATION;
......
package org.briarproject.briar.sharing;
import org.briarproject.bramble.TestUtils;
import org.briarproject.bramble.ValidatorTestCase;
import org.briarproject.bramble.api.FormatException;
import org.briarproject.bramble.api.UniqueId;
import org.briarproject.bramble.api.client.BdfMessageContext;
import org.briarproject.bramble.api.data.BdfDictionary;
import org.briarproject.bramble.api.data.BdfList;
import org.briarproject.bramble.test.TestUtils;
import org.briarproject.bramble.test.ValidatorTestCase;
import org.briarproject.briar.api.client.SessionId;
import org.junit.Test;
......
package org.briarproject.briar.sharing;
import org.briarproject.briar.BriarTestCase;
import org.briarproject.briar.test.BriarTestCase;
import org.junit.Test;
import static org.junit.Assert.fail;
......
package org.briarproject.briar;
package org.briarproject.briar.test;
import net.jodah.concurrentunit.Waiter;
import org.briarproject.bramble.TestUtils;
import org.briarproject.bramble.api.client.ClientHelper;
import org.briarproject.bramble.api.client.ContactGroupFactory;
import org.briarproject.bramble.api.contact.Contact;
......@@ -30,6 +29,8 @@ import org.briarproject.bramble.lifecycle.LifecycleModule;
import org.briarproject.bramble.properties.PropertiesModule;
import org.briarproject.bramble.sync.SyncModule;
import org.briarproject.bramble.system.SystemModule;
import org.briarproject.bramble.test.TestPluginConfigModule;
import org.briarproject.bramble.test.TestUtils;
import org.briarproject.bramble.transport.TransportModule;
import org.briarproject.briar.api.blog.BlogFactory;
import org.briarproject.briar.api.blog.BlogPostFactory;
......@@ -59,11 +60,10 @@ import javax.annotation.Nullable;
import javax.inject.Inject;
import static junit.framework.Assert.assertNotNull;
import static org.briarproject.bramble.TestUtils.getSecretKey;
import static org.briarproject.bramble.api.sync.ValidationManager.State.DELIVERED;
import static org.briarproject.bramble.api.sync.ValidationManager.State.INVALID;
import static org.briarproject.bramble.api.sync.ValidationManager.State.PENDING;
import static org.briarproject.briar.TestPluginConfigModule.MAX_LATENCY;
import static org.briarproject.bramble.test.TestUtils.getSecretKey;
import static org.junit.Assert.assertTrue;
@MethodsNotNullByDefault
......@@ -325,7 +325,7 @@ public abstract class BriarIntegrationTest<C extends BriarIntegrationTestCompone
ByteArrayOutputStream out = new ByteArrayOutputStream();
// Create an outgoing sync session
SyncSession sessionFrom =
fromSync.createSimplexOutgoingSession(toId, MAX_LATENCY, out);
fromSync.createSimplexOutgoingSession(toId, TestPluginConfigModule.MAX_LATENCY, out);
// Write whatever needs to be written
sessionFrom.run();
out.close();
......
package org.briarproject.briar;
package org.briarproject.briar.test;
import org.briarproject.bramble.TestDatabaseModule;
import org.briarproject.bramble.TestSeedProviderModule;
import org.briarproject.bramble.api.client.ClientHelper;
import org.briarproject.bramble.api.contact.ContactManager;
import org.briarproject.bramble.api.db.DatabaseComponent;
......@@ -21,6 +19,9 @@ import org.briarproject.bramble.lifecycle.LifecycleModule;
import org.briarproject.bramble.properties.PropertiesModule;
import org.briarproject.bramble.sync.SyncModule;
import org.briarproject.bramble.system.SystemModule;
import org.briarproject.bramble.test.TestDatabaseModule;
import org.briarproject.bramble.test.TestPluginConfigModule;
import org.briarproject.bramble.test.TestSeedProviderModule;
import org.briarproject.bramble.transport.TransportModule;
import org.briarproject.briar.api.blog.BlogManager;
import org.briarproject.briar.api.blog.BlogSharingManager;
......
package org.briarproject.briar;
package org.briarproject.briar.test;
import org.briarproject.bramble.BrambleTestCase;
import org.briarproject.bramble.test.BrambleTestCase;
public abstract class BriarTestCase extends BrambleTestCase {
......
package org.briarproject.briar;
package org.briarproject.briar.test;
import org.briarproject.bramble.api.db.DbException;
import org.briarproject.bramble.api.sync.GroupId;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment