mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 14:19:53 +01:00
Turn commonly used variables into fields.
This commit is contained in:
@@ -122,6 +122,8 @@ public class DatabaseComponentImplTest extends BrambleMockTestCase {
|
|||||||
private final KeySetId keySetId;
|
private final KeySetId keySetId;
|
||||||
private final PendingContactId pendingContactId;
|
private final PendingContactId pendingContactId;
|
||||||
private final Random random = new Random();
|
private final Random random = new Random();
|
||||||
|
private final boolean shared = random.nextBoolean();
|
||||||
|
private final boolean temporary = random.nextBoolean();
|
||||||
|
|
||||||
public DatabaseComponentImplTest() {
|
public DatabaseComponentImplTest() {
|
||||||
clientId = getClientId();
|
clientId = getClientId();
|
||||||
@@ -244,9 +246,6 @@ public class DatabaseComponentImplTest extends BrambleMockTestCase {
|
|||||||
@Test(expected = NoSuchGroupException.class)
|
@Test(expected = NoSuchGroupException.class)
|
||||||
public void testLocalMessagesAreNotStoredUnlessGroupExists()
|
public void testLocalMessagesAreNotStoredUnlessGroupExists()
|
||||||
throws Exception {
|
throws Exception {
|
||||||
boolean shared = random.nextBoolean();
|
|
||||||
boolean temporary = random.nextBoolean();
|
|
||||||
|
|
||||||
context.checking(new Expectations() {{
|
context.checking(new Expectations() {{
|
||||||
oneOf(database).startTransaction();
|
oneOf(database).startTransaction();
|
||||||
will(returnValue(txn));
|
will(returnValue(txn));
|
||||||
@@ -264,9 +263,6 @@ public class DatabaseComponentImplTest extends BrambleMockTestCase {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAddLocalMessage() throws Exception {
|
public void testAddLocalMessage() throws Exception {
|
||||||
boolean shared = random.nextBoolean();
|
|
||||||
boolean temporary = random.nextBoolean();
|
|
||||||
|
|
||||||
context.checking(new Expectations() {{
|
context.checking(new Expectations() {{
|
||||||
oneOf(database).startTransaction();
|
oneOf(database).startTransaction();
|
||||||
will(returnValue(txn));
|
will(returnValue(txn));
|
||||||
@@ -1528,8 +1524,6 @@ public class DatabaseComponentImplTest extends BrambleMockTestCase {
|
|||||||
public void testMessageDependencies() throws Exception {
|
public void testMessageDependencies() throws Exception {
|
||||||
int shutdownHandle = 12345;
|
int shutdownHandle = 12345;
|
||||||
MessageId messageId2 = new MessageId(getRandomId());
|
MessageId messageId2 = new MessageId(getRandomId());
|
||||||
boolean shared = random.nextBoolean();
|
|
||||||
boolean temporary = random.nextBoolean();
|
|
||||||
|
|
||||||
context.checking(new Expectations() {{
|
context.checking(new Expectations() {{
|
||||||
// open()
|
// open()
|
||||||
|
|||||||
Reference in New Issue
Block a user