mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 20:59:54 +01:00
Final code review nitpicks.
This commit is contained in:
@@ -17,7 +17,6 @@ import org.briarproject.briar.api.introduction.IntroductionResponse;
|
||||
import org.briarproject.briar.api.introduction.event.IntroductionResponseReceivedEvent;
|
||||
import org.briarproject.briar.autodelete.AbstractAutoDeleteTest;
|
||||
import org.briarproject.briar.test.BriarIntegrationTestComponent;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -391,13 +390,13 @@ public class AutoDeleteIntegrationTest extends AbstractAutoDeleteTest {
|
||||
// FIRST CYCLE
|
||||
introduceAndAutoDecline();
|
||||
|
||||
Assert.assertTrue(c0.getIntroductionManager()
|
||||
assertTrue(c0.getIntroductionManager()
|
||||
.canIntroduce(contact1From0, contact2From0));
|
||||
|
||||
// SECOND CYCLE
|
||||
introduceAndAutoDecline();
|
||||
|
||||
Assert.assertTrue(c0.getIntroductionManager()
|
||||
assertTrue(c0.getIntroductionManager()
|
||||
.canIntroduce(contact1From0, contact2From0));
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import org.briarproject.briar.api.sharing.Shareable;
|
||||
import org.briarproject.briar.api.sharing.SharingInvitationItem;
|
||||
import org.briarproject.briar.api.sharing.SharingManager;
|
||||
import org.briarproject.briar.autodelete.AbstractAutoDeleteTest;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
@@ -42,7 +43,8 @@ public abstract class AbstractAutoDeleteIntegrationTest
|
||||
|
||||
protected abstract Class<? extends ConversationMessageReceivedEvent<? extends InvitationResponse>> getResponseReceivedEventClass();
|
||||
|
||||
protected void testAutoDeclinedSharing() throws Exception {
|
||||
@Test
|
||||
public void testAutoDeclinedSharing() throws Exception {
|
||||
setAutoDeleteTimer(c0, contactId1From0, MIN_AUTO_DELETE_TIMER_MS);
|
||||
|
||||
// Send invitation
|
||||
@@ -191,7 +193,8 @@ public abstract class AbstractAutoDeleteIntegrationTest
|
||||
assertGroupCount(c1, contactId0From1, 1, 1);
|
||||
}
|
||||
|
||||
protected void testRespondAfterSenderDeletedInvitation() throws Exception {
|
||||
@Test
|
||||
public void testRespondAfterSenderDeletedInvitation() throws Exception {
|
||||
setAutoDeleteTimer(c0, contactId1From0, MIN_AUTO_DELETE_TIMER_MS);
|
||||
|
||||
assertTrue(subscriptions0().contains(getShareable()));
|
||||
|
||||
@@ -4,14 +4,13 @@ import org.briarproject.bramble.api.db.DbException;
|
||||
import org.briarproject.briar.api.blog.Blog;
|
||||
import org.briarproject.briar.api.blog.BlogManager;
|
||||
import org.briarproject.briar.api.blog.event.BlogInvitationResponseReceivedEvent;
|
||||
import org.briarproject.briar.api.conversation.ConversationManager;
|
||||
import org.briarproject.briar.api.conversation.ConversationManager.ConversationClient;
|
||||
import org.briarproject.briar.api.conversation.event.ConversationMessageReceivedEvent;
|
||||
import org.briarproject.briar.api.sharing.InvitationResponse;
|
||||
import org.briarproject.briar.api.sharing.Shareable;
|
||||
import org.briarproject.briar.api.sharing.SharingManager;
|
||||
import org.briarproject.briar.test.BriarIntegrationTestComponent;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
@@ -40,7 +39,7 @@ public class AutoDeleteBlogIntegrationTest
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ConversationManager.ConversationClient getConversationClient(
|
||||
protected ConversationClient getConversationClient(
|
||||
BriarIntegrationTestComponent component) {
|
||||
return component.getBlogSharingManager();
|
||||
}
|
||||
@@ -74,14 +73,4 @@ public class AutoDeleteBlogIntegrationTest
|
||||
protected Class<? extends ConversationMessageReceivedEvent<? extends InvitationResponse>> getResponseReceivedEventClass() {
|
||||
return responseReceivedEventClass;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAutoDeclinedBlogSharing() throws Exception {
|
||||
testAutoDeclinedSharing();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRespondAfterSenderDeletedBlogInvitation() throws Exception {
|
||||
testRespondAfterSenderDeletedInvitation();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.briarproject.briar.sharing;
|
||||
|
||||
import org.briarproject.bramble.api.db.DbException;
|
||||
import org.briarproject.briar.api.conversation.ConversationManager;
|
||||
import org.briarproject.briar.api.conversation.ConversationManager.ConversationClient;
|
||||
import org.briarproject.briar.api.conversation.event.ConversationMessageReceivedEvent;
|
||||
import org.briarproject.briar.api.forum.Forum;
|
||||
import org.briarproject.briar.api.forum.ForumManager;
|
||||
@@ -11,7 +11,6 @@ import org.briarproject.briar.api.sharing.Shareable;
|
||||
import org.briarproject.briar.api.sharing.SharingManager;
|
||||
import org.briarproject.briar.test.BriarIntegrationTestComponent;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
@@ -20,10 +19,10 @@ public class AutoDeleteForumIntegrationTest
|
||||
|
||||
private SharingManager<Forum> sharingManager0;
|
||||
private SharingManager<Forum> sharingManager1;
|
||||
protected Forum shareable;
|
||||
private Forum shareable;
|
||||
private ForumManager manager0;
|
||||
private ForumManager manager1;
|
||||
protected Class<ForumInvitationResponseReceivedEvent>
|
||||
private Class<ForumInvitationResponseReceivedEvent>
|
||||
responseReceivedEventClass;
|
||||
|
||||
@Before
|
||||
@@ -39,7 +38,7 @@ public class AutoDeleteForumIntegrationTest
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ConversationManager.ConversationClient getConversationClient(
|
||||
protected ConversationClient getConversationClient(
|
||||
BriarIntegrationTestComponent component) {
|
||||
return component.getForumSharingManager();
|
||||
}
|
||||
@@ -73,15 +72,4 @@ public class AutoDeleteForumIntegrationTest
|
||||
protected Class<? extends ConversationMessageReceivedEvent<? extends InvitationResponse>> getResponseReceivedEventClass() {
|
||||
return responseReceivedEventClass;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAutoDeclinedForumSharing() throws Exception {
|
||||
testAutoDeclinedSharing();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRespondAfterSenderDeletedForumInvitation()
|
||||
throws Exception {
|
||||
testRespondAfterSenderDeletedInvitation();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user