Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

package org.eclipse.jface.databinding.conformance;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertEquals;

Check warning on line 19 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Import

ERROR: The import org.junit.jupiter cannot be resolved
import static org.junit.jupiter.api.Assertions.assertFalse;

Check warning on line 20 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Import

ERROR: The import org.junit.jupiter cannot be resolved
import static org.junit.jupiter.api.Assertions.assertTrue;

Check warning on line 21 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Import

ERROR: The import org.junit.jupiter cannot be resolved

import java.util.Arrays;
import java.util.Collections;
Expand All @@ -30,8 +30,8 @@
import org.eclipse.jface.databinding.conformance.util.ChangeEventTracker;
import org.eclipse.jface.databinding.conformance.util.CurrentRealm;
import org.eclipse.jface.databinding.conformance.util.RealmTester;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;

Check warning on line 33 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Import

ERROR: The import org.junit.jupiter cannot be resolved
import org.junit.jupiter.api.Test;

Check warning on line 34 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Import

ERROR: The import org.junit.jupiter cannot be resolved

/**
* Mutability tests for IObservableCollection.
Expand All @@ -58,46 +58,46 @@
}

@Override
@Before
@BeforeEach

Check warning on line 61 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: BeforeEach cannot be resolved to a type
public void setUp() throws Exception {
super.setUp();
collection = (IObservableCollection) super.getObservable();
}

@Test

Check warning on line 67 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAdd_ChangeEvent() throws Exception {
assertChangeEventFired(() -> collection.add(delegate.createElement(collection)), "Collection.add(Object)",
collection);
}

@Test

Check warning on line 73 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAdd_RealmCheck() throws Exception {
RealmTester.exerciseCurrent(() -> collection.add(delegate.createElement(collection)),
(CurrentRealm) collection.getRealm());
}

@Test

Check warning on line 79 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAdd_ChangeEventFiredAfterElementIsAdded() throws Exception {
final Object element = delegate.createElement(collection);

assertContainsDuringChangeEvent(() -> collection.add(element), "Collection.add(Object)", collection, element);
}

@Test

Check warning on line 86 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAddAll_ChangeEvent() throws Exception {
assertChangeEventFired(
() -> collection.addAll(Arrays.asList(new Object[] { delegate.createElement(collection) })),
"Collection.addAll(Collection)", collection);
}

@Test

Check warning on line 93 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAddAll_RealmCheck() throws Exception {
RealmTester.exerciseCurrent(
() -> collection.addAll(Arrays.asList(new Object[] { delegate.createElement(collection) })),
(CurrentRealm) collection.getRealm());
}

@Test

Check warning on line 100 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAddAll_ChangeEventFiredAfterElementsAreAdded()
throws Exception {
final Object element = delegate.createElement(collection);
Expand All @@ -106,7 +106,7 @@
"Collection.addAll(Collection)", collection, element);
}

@Test

Check warning on line 109 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRemove_ChangeEvent() throws Exception {
final Object element = delegate.createElement(collection);
collection.add(element);
Expand All @@ -114,13 +114,13 @@
assertChangeEventFired(() -> collection.remove(element), "Collection.remove(Object)", collection);
}

@Test

Check warning on line 117 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRemove_RealmCheck() throws Exception {
RealmTester.exerciseCurrent(() -> collection.remove(delegate.createElement(collection)),
(CurrentRealm) collection.getRealm());
}

@Test

Check warning on line 123 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRemove_ChangeEventFiredAfterElementIsRemoved()
throws Exception {
final Object element = delegate.createElement(collection);
Expand All @@ -130,7 +130,7 @@
element);
}

@Test

Check warning on line 133 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRemoveAll_ChangeEvent() throws Exception {
final Object element = delegate.createElement(collection);
collection.add(element);
Expand All @@ -139,14 +139,14 @@
"Collection.removeAll(Collection)", collection);
}

@Test

Check warning on line 142 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRemoveAll_RealmCheck() throws Exception {
RealmTester.exerciseCurrent(
() -> collection.removeAll(Arrays.asList(new Object[] { delegate.createElement(collection) })),
(CurrentRealm) collection.getRealm());
}

@Test

Check warning on line 149 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRemoveAll_ChangeEventFiredAfterElementsAreRemoved()
throws Exception {
final Object element = delegate.createElement(collection);
Expand All @@ -156,16 +156,15 @@
"Collection.removeAll(Collection)", collection, element);
}

@Test

Check warning on line 159 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRemoveAll_NoChange() throws Exception {
ChangeEventTracker tracker = ChangeEventTracker.observe(collection);
collection.removeAll(Collections.EMPTY_LIST);
assertEquals(
"List.removeAll on an empty list should not fire a list change event",
0, tracker.count);
assertEquals(0, tracker.count,

Check warning on line 163 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertEquals(int, int, String) is undefined for the type MutableObservableCollectionContractTest
"List.removeAll on an empty list should not fire a list change event");
}

@Test

Check warning on line 167 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRetainAll_ChangeEvent() throws Exception {
final Object element1 = delegate.createElement(collection);
collection.add(element1);
Expand All @@ -176,13 +175,13 @@
"Collection.retainAll(Collection)", collection);
}

@Test

Check warning on line 178 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRetainAll_RealmCheck() throws Exception {
RealmTester.exerciseCurrent(() -> collection.retainAll(Collections.EMPTY_LIST),
(CurrentRealm) collection.getRealm());
}

@Test

Check warning on line 184 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRetainAll_ChangeEventFiredAfterElementsAreRetained()
throws Exception {
Object element1 = delegate.createElement(collection);
Expand All @@ -191,8 +190,8 @@
collection.add(element2);

// precondition
assertTrue(collection.contains(element1));

Check warning on line 193 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertTrue(boolean) is undefined for the type MutableObservableCollectionContractTest
assertTrue(collection.contains(element2));

Check warning on line 194 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertTrue(boolean) is undefined for the type MutableObservableCollectionContractTest

ContainsListener listener1 = new ContainsListener(collection, element1)
.init();
Expand All @@ -205,35 +204,33 @@
listener2.contains = true;

collection.retainAll(Arrays.asList(new Object[] { element1 }));
assertTrue(
formatFail("When Collection.retainAll(...) fires the change event the element should have been retained in the Collection."),
listener1.contains);
assertFalse(
formatFail("When Collection.retainAll(...) fires the change event the element should have been removed from the Collection."),
listener2.contains);
assertTrue(listener1.contains,

Check warning on line 207 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertTrue(boolean, String) is undefined for the type MutableObservableCollectionContractTest
formatFail("When Collection.retainAll(...) fires the change event the element should have been retained in the Collection."));
assertFalse(listener2.contains,

Check warning on line 209 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertFalse(boolean, String) is undefined for the type MutableObservableCollectionContractTest
formatFail("When Collection.retainAll(...) fires the change event the element should have been removed from the Collection."));
}

@Test

Check warning on line 213 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRetainAll_NoChangeFiresNoChangeEvent() throws Exception {
ChangeEventTracker tracker = ChangeEventTracker.observe(collection);
collection.retainAll(Collections.EMPTY_LIST);
assertEquals("List.retainAll should not have fired a change event:", 0,
tracker.count);
assertEquals(0, tracker.count,

Check warning on line 217 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertEquals(int, int, String) is undefined for the type MutableObservableCollectionContractTest
"List.retainAll should not have fired a change event:");
}

@Test

Check warning on line 221 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testClear_ChangeEvent() throws Exception {
collection.add(delegate.createElement(collection));

assertChangeEventFired(() -> collection.clear(), "List.clear()", collection);
}

@Test

Check warning on line 228 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testClear_RealmCheck() throws Exception {
RealmTester.exerciseCurrent(() -> collection.clear(), (CurrentRealm) collection.getRealm());
}

@Test

Check warning on line 233 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testClear_ChangeEventFiredAfterElementIsRemoved()
throws Exception {
Object element = delegate.createElement(collection);
Expand All @@ -253,12 +250,11 @@
ChangeEventTracker listener = ChangeEventTracker.observe(collection);
runnable.run();

assertEquals(formatFail(methodName + " should fire one ChangeEvent."),
1, listener.count);
assertEquals(
assertEquals(1, listener.count,

Check warning on line 253 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertEquals(int, int, String) is undefined for the type MutableObservableCollectionContractTest
formatFail(methodName + " should fire one ChangeEvent."));
assertEquals(collection, listener.event.getObservable(),

Check warning on line 255 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertEquals(IObservableCollection, IObservable, String) is undefined for the type MutableObservableCollectionContractTest
formatFail(methodName
+ "'s change event observable should be the created Collection."),
collection, listener.event.getObservable());
+ "'s change event observable should be the created Collection."));
}

/**
Expand All @@ -271,17 +267,17 @@
Object elementNotContained) {

// precondition
assertTrue(collection.contains(elementNotContained));

Check warning on line 270 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertTrue(boolean) is undefined for the type MutableObservableCollectionContractTest

ContainsListener listener = new ContainsListener(collection,
elementNotContained).init();
listener.contains = true;
collection.remove(elementNotContained);
assertFalse(
assertFalse(listener.contains,

Check warning on line 276 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertFalse(boolean, String) is undefined for the type MutableObservableCollectionContractTest
formatFail(new StringBuilder("When ")
.append(methodName)
.append(" fires a change event the element should have been removed from the Collection.")
.toString()), listener.contains);
.toString()));
}

/**
Expand All @@ -296,14 +292,14 @@
elementContained).init();

// precondition
assertFalse(collection.contains(elementContained));

Check warning on line 295 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertFalse(boolean) is undefined for the type MutableObservableCollectionContractTest
runnable.run();

assertTrue(
assertTrue(listener.contains,

Check warning on line 298 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableCollectionContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertTrue(boolean, String) is undefined for the type MutableObservableCollectionContractTest
formatFail(new StringBuilder("When ")
.append(methodName)
.append(" fires a change event the element should have been added to the Collection.")
.toString()), listener.contains);
.toString()));
}

/* package */static class ContainsListener implements IChangeListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

package org.eclipse.jface.databinding.conformance;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame;
import static org.junit.jupiter.api.Assertions.assertEquals;

Check warning on line 19 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Import

ERROR: The import org.junit.jupiter cannot be resolved
import static org.junit.jupiter.api.Assertions.assertSame;

Check warning on line 20 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Import

ERROR: The import org.junit.jupiter cannot be resolved

import java.util.ArrayList;
import java.util.Arrays;
Expand All @@ -30,9 +30,8 @@
import org.eclipse.jface.databinding.conformance.delegate.IObservableCollectionContractDelegate;
import org.eclipse.jface.databinding.conformance.util.ChangeEventTracker;
import org.eclipse.jface.databinding.conformance.util.ListChangeEventTracker;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;

Check warning on line 33 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Import

ERROR: The import org.junit.jupiter cannot be resolved
import org.junit.jupiter.api.Test;

Check warning on line 34 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Import

ERROR: The import org.junit.jupiter cannot be resolved

/**
* Mutability tests for IObservableList.
Expand Down Expand Up @@ -60,20 +59,20 @@
}

@Override
@Before
@BeforeEach

Check warning on line 62 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: BeforeEach cannot be resolved to a type
public void setUp() throws Exception {
super.setUp();
list = (IObservableList) getObservable();
}

@Test

Check warning on line 68 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAdd_ListChangeEvent() throws Exception {
final Object element = delegate.createElement(list);
assertListChangeEventFired(() -> list.add(element), "List.add(Object)", list,
Collections.singletonList(element));
}

@Test

Check warning on line 75 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAdd_ListDiffEntry() throws Exception {
Object element0 = delegate.createElement(list);
list.add(element0);
Expand All @@ -83,19 +82,19 @@
Arrays.asList(new Object[] { element0, element1 }));
}

@Test

Check warning on line 85 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAddAtIndex_ChangeEvent() throws Exception {
assertChangeEventFired(() -> list.add(0, delegate.createElement(list)), "List.add(int, Object)", list);
}

@Test

Check warning on line 90 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAddAtIndex_ListChangeEvent() throws Exception {
final Object element = delegate.createElement(list);
assertListChangeEventFired(() -> list.add(0, element), "List.add(int, Object)", list,
Collections.singletonList(element));
}

@Test

Check warning on line 97 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAddAtIndex_ChangeEventFiredAfterElementIsAdded()
throws Exception {
final Object element = delegate.createElement(list);
Expand All @@ -103,7 +102,7 @@
assertContainsDuringChangeEvent(() -> list.add(0, element), "List.add(int, Collection)", list, element);
}

@Test

Check warning on line 105 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAddAtIndex_ListDiffEntry() throws Exception {
Object element0 = delegate.createElement(list);
list.add(element0);
Expand All @@ -113,14 +112,14 @@
Arrays.asList(new Object[] { element0, element1 }));
}

@Test

Check warning on line 115 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAddAll_ListChangeEvent() throws Exception {
final Object element = delegate.createElement(list);
assertListChangeEventFired(() -> list.addAll(Collections.singletonList(element)), "List.addAll(Collection",
list, Collections.singletonList(element));
}

@Test

Check warning on line 122 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAddAll_ListDiffEntry() throws Exception {
final Object element = delegate.createElement(list);

Expand All @@ -128,7 +127,7 @@
list, Collections.singletonList(element));
}

@Test

Check warning on line 130 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAddAll_ListDiffEntry2() throws Exception {
final Object element0 = delegate.createElement(list);
list.add(element0);
Expand All @@ -139,13 +138,13 @@
Arrays.asList(new Object[] { element0, element1 }));
}

@Test

Check warning on line 141 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAddAllAtIndex_ChangeEvent() throws Exception {
assertChangeEventFired(() -> list.addAll(0, Arrays.asList(new Object[] { delegate.createElement(list) })),
"List.addAll(int, Collection)", list);
}

@Test

Check warning on line 147 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAddAllAtIndex_ListChangeEvent() throws Exception {
final Object element = delegate.createElement(list);
assertListChangeEventFired(() -> list.addAll(0, Collections.singletonList(element)),
Expand All @@ -153,7 +152,7 @@
Collections.singletonList(element));
}

@Test

Check warning on line 155 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAddAllAtIndex_ChangeEventFiredAfterElementIsAdded()
throws Exception {
final Object element = delegate.createElement(list);
Expand All @@ -162,7 +161,7 @@
"List.addAll(int, Collection)", list, element);
}

@Test

Check warning on line 164 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAddAllAtIndex_ListDiffEntry() throws Exception {
Object element0 = delegate.createElement(list);
list.add(element0);
Expand All @@ -173,34 +172,34 @@
Arrays.asList(new Object[] { element0, element1 }));
}

@Test

Check warning on line 175 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testSet_ChangeEvent() throws Exception {
list.add(delegate.createElement(list));

assertChangeEventFired(() -> list.set(0, delegate.createElement(list)), "List.set(int, Object)", list);
}

@Test

Check warning on line 182 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testSet_ListChangeEvent() throws Exception {
final Object element0 = delegate.createElement(list);
list.add(element0);
final Object element1 = delegate.createElement(list);

assertListChangeEventFired(() -> assertSame(element0, list.set(0, element1)), "List.set(int, Object)", list,
assertListChangeEventFired(() -> assertSame(element0, list.set(0, element1), "List.set(int, Object)"), "List.set(int, Object)", list,

Check warning on line 188 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertSame(Object, Object, String) is undefined for the type MutableObservableListContractTest
Arrays.asList(new Object[] { element1 }));
}

@Test

Check warning on line 192 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testSet_ChangeEventFiredAfterElementIsSet() throws Exception {
final Object element1 = delegate.createElement(list);
list.add(element1);
final Object element2 = delegate.createElement(list);

assertContainsDuringChangeEvent(() -> assertSame(element1, list.set(0, element2)), "List.set(int, Object)",
assertContainsDuringChangeEvent(() -> assertSame(element1, list.set(0, element2), "List.set(int, Object)"), "List.set(int, Object)",

Check warning on line 198 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertSame(Object, Object, String) is undefined for the type MutableObservableListContractTest
list, element2);
}

@Test

Check warning on line 202 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testSet_ListChangeEvent2() throws Exception {
Object element0 = delegate.createElement(list);
list.add(element0);
Expand All @@ -212,7 +211,7 @@
Arrays.asList(new Object[] { element0, newElement1 }));
}

@Test

Check warning on line 214 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testMove_ChangeEvent() throws Exception {
list.add(delegate.createElement(list));
list.add(delegate.createElement(list));
Expand All @@ -220,7 +219,7 @@
assertChangeEventFired(() -> list.move(0, 1), "IObservableList.move(int, int)", list);
}

@Test

Check warning on line 222 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testMove_NoChangeEventAtSameIndex() throws Exception {
Object element = delegate.createElement(list);
list.add(element);
Expand All @@ -229,43 +228,41 @@

final Object movedElement = list.move(0, 0);

assertEquals(
formatFail("IObservableList.move(int,int) should return the moved element"),
element, movedElement);
assertEquals(
assertEquals(element, movedElement,

Check warning on line 231 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertEquals(Object, Object, String) is undefined for the type MutableObservableListContractTest
formatFail("IObservableList.move(int,int) should return the moved element"));
assertEquals(0, tracker.count,

Check warning on line 233 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertEquals(int, int, String) is undefined for the type MutableObservableListContractTest
formatFail("IObservableLIst.move(int,int) should not fire a change event"
+ "when the old and new indices are the same"), 0,
tracker.count);
+ "when the old and new indices are the same"));
}

@Test

Check warning on line 238 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testMove_ListChangeEvent() throws Exception {
final Object element0 = delegate.createElement(list);
list.add(element0);
final Object element1 = delegate.createElement(list);
list.add(element1);

assertListChangeEventFired(() -> assertSame(element0, list.move(0, 1)), "IObservableList.move(int, int)", list,
assertListChangeEventFired(() -> assertSame(element0, list.move(0, 1), "IObservableList.move(int, int)"), "IObservableList.move(int, int)", list,

Check warning on line 245 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertSame(Object, Object, String) is undefined for the type MutableObservableListContractTest
Arrays.asList(new Object[] { element1, element0 }));
}

@Test

Check warning on line 249 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testMove_ChangeEventFiredAfterElementIsMoved() throws Exception {
Object element0 = delegate.createElement(list);
Object element1 = delegate.createElement(list);
list.add(element0);
list.add(element1);

assertSame(element0, list.get(0));

Check warning on line 256 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertSame(Object, Object) is undefined for the type MutableObservableListContractTest
assertSame(element1, list.get(1));

Check warning on line 257 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertSame(Object, Object) is undefined for the type MutableObservableListContractTest

list.move(0, 1);

assertSame(element1, list.get(0));

Check warning on line 261 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertSame(Object, Object) is undefined for the type MutableObservableListContractTest
assertSame(element0, list.get(1));

Check warning on line 262 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertSame(Object, Object) is undefined for the type MutableObservableListContractTest
}

@Test

Check warning on line 265 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testMove_ListChangeEvent2() {
Object element0 = delegate.createElement(list);
list.add(element0);
Expand All @@ -276,7 +273,7 @@
Arrays.asList(new Object[] { element1, element0 }));
}

@Test

Check warning on line 276 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRemove_ListChangeEvent() throws Exception {
final Object element = delegate.createElement(list);
list.add(element);
Expand All @@ -284,7 +281,7 @@
assertListChangeEventFired(() -> list.remove(element), "List.remove(Object)", list, Collections.EMPTY_LIST);
}

@Test

Check warning on line 284 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRemove_ListDiffEntry() throws Exception {
final Object element0 = delegate.createElement(list);
list.add(element0);
Expand All @@ -295,21 +292,21 @@
Collections.singletonList(element0));
}

@Test

Check warning on line 295 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRemoveAtIndex_ChangeEvent() throws Exception {
list.add(delegate.createElement(list));

assertChangeEventFired(() -> list.remove(0), "List.remove(int)", list);
}

@Test

Check warning on line 302 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRemoveAtIndex_ListChangeEvent() throws Exception {
list.add(delegate.createElement(list));

assertListChangeEventFired(() -> list.remove(0), "List.remove(int)", list, Collections.EMPTY_LIST);
}

@Test

Check warning on line 309 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRemoveAtIndex_ChangeEventFiredAfterElementIsRemoved()
throws Exception {
final Object element = delegate.createElement(list);
Expand All @@ -318,7 +315,7 @@
assertDoesNotContainDuringChangeEvent(() -> list.remove(0), "List.remove(int)", list, element);
}

@Test

Check warning on line 318 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRemoveAtIndex_ListDiffEntry() throws Exception {
Object element0 = delegate.createElement(list);
list.add(element0);
Expand All @@ -328,7 +325,7 @@
assertListChangeEventFired(() -> list.remove(1), "List.remove(int)", list, Collections.singletonList(element0));
}

@Test

Check warning on line 328 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRemoveAll_ListChangeEvent() throws Exception {
final Object element = delegate.createElement(list);
list.add(element);
Expand All @@ -337,7 +334,7 @@
"List.removeAll(Collection)", list, Collections.EMPTY_LIST);
}

@Test

Check warning on line 337 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRemoveAll_ListDiffEntry() throws Exception {
final Object element = delegate.createElement(list);
list.add(element);
Expand All @@ -346,7 +343,7 @@
"List.removeAll(Collection)", list, Collections.EMPTY_LIST);
}

@Test

Check warning on line 346 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRemoveAll_ListDiffEntry2() throws Exception {
Object element0 = delegate.createElement(list);
list.add(element0);
Expand All @@ -358,7 +355,7 @@
Collections.singletonList(element0));
}

@Test

Check warning on line 358 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRetainAll_ListChangeEvent() throws Exception {
final Object element0 = delegate.createElement(list);
list.add(element0);
Expand All @@ -369,7 +366,7 @@
Collections.singletonList(element0));
}

@Test

Check warning on line 369 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRetainAll_ListDiffEntry() throws Exception {
final Object element = delegate.createElement(list);
list.add(element);
Expand All @@ -380,27 +377,27 @@
Collections.singletonList(element));
}

@Test

Check warning on line 380 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testClear_ListChangeEvent() throws Exception {
list.add(delegate.createElement(list));

assertListChangeEventFired(() -> list.clear(), "List.clear()", list, Collections.EMPTY_LIST);
}

@Test

Check warning on line 387 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testClear_ListDiffEntry() throws Exception {
list.add(delegate.createElement(list));

assertListChangeEventFired(() -> list.clear(), "List.clear()", list, Collections.EMPTY_LIST);
}

@Test

Check warning on line 394 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testClear_ClearsList() {
Object element = delegate.createElement(list);
list.add(element);
Assert.assertEquals(Collections.singletonList(element), list);
assertEquals(Collections.singletonList(element), list);

Check warning on line 398 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertEquals(Collections.singletonList(element), IObservableList) is undefined for the type MutableObservableListContractTest
list.clear();
Assert.assertEquals(Collections.EMPTY_LIST, list);
assertEquals(Collections.EMPTY_LIST, list);

Check warning on line 400 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertEquals(List, IObservableList) is undefined for the type MutableObservableListContractTest
}

private void assertListChangeEventFired(Runnable runnable,
Expand All @@ -416,32 +413,30 @@

runnable.run();

assertEquals(formatFail(methodName
+ " should fire one ListChangeEvent."), 1, listListener.count);
assertEquals(formatFail(methodName
+ "'s change event observable should be the created List."),
list, listListener.event.getObservable());

assertEquals(
formatFail("Two notifications should have been received."), 2,
queue.size());
assertEquals("ChangeEvent of " + methodName
+ " should have fired before the ListChangeEvent.",
changeListener, queue.get(0));
assertEquals("ListChangeEvent of " + methodName
+ " should have fired after the ChangeEvent.", listListener,
queue.get(1));

assertEquals(formatFail(methodName
+ " did not leave observable list with the expected contents"),
newList, list);
assertEquals(1, listListener.count, formatFail(methodName

Check warning on line 416 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertEquals(int, int, String) is undefined for the type MutableObservableListContractTest
+ " should fire one ListChangeEvent."));
assertEquals(list, listListener.event.getObservable(),

Check warning on line 418 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertEquals(IObservableList, IObservable, String) is undefined for the type MutableObservableListContractTest
formatFail(methodName
+ "'s change event observable should be the created List."));

assertEquals(2, queue.size(),

Check warning on line 422 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertEquals(int, int, String) is undefined for the type MutableObservableListContractTest
formatFail("Two notifications should have been received."));
assertEquals(changeListener, queue.get(0),

Check warning on line 424 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertEquals(ChangeEventTracker, IObservablesListener, String) is undefined for the type MutableObservableListContractTest
"ChangeEvent of " + methodName
+ " should have fired before the ListChangeEvent.");
assertEquals(listListener, queue.get(1),

Check warning on line 427 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertEquals(ListChangeEventTracker, IObservablesListener, String) is undefined for the type MutableObservableListContractTest
"ListChangeEvent of " + methodName
+ " should have fired after the ChangeEvent.");

assertEquals(newList, list,

Check warning on line 431 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertEquals(List, IObservableList, String) is undefined for the type MutableObservableListContractTest
formatFail(methodName
+ " did not leave observable list with the expected contents"));

ListDiff diff = listListener.event.diff;
diff.applyTo(oldList);
assertEquals(
assertEquals(newList, oldList,

Check warning on line 437 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableListContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertEquals(List, List, String) is undefined for the type MutableObservableListContractTest
formatFail(methodName
+ " fired a diff which does not represent the expected list change"),
newList, oldList);
+ " fired a diff which does not represent the expected list change"));

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

package org.eclipse.jface.databinding.conformance;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertEquals;

Check warning on line 19 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Import

ERROR: The import org.junit.jupiter cannot be resolved
import static org.junit.jupiter.api.Assertions.assertTrue;

Check warning on line 20 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Import

ERROR: The import org.junit.jupiter cannot be resolved

import java.util.ArrayList;
import java.util.Arrays;
Expand All @@ -30,8 +30,8 @@
import org.eclipse.jface.databinding.conformance.delegate.IObservableCollectionContractDelegate;
import org.eclipse.jface.databinding.conformance.util.ChangeEventTracker;
import org.eclipse.jface.databinding.conformance.util.SetChangeEventTracker;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;

Check warning on line 33 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Import

ERROR: The import org.junit.jupiter cannot be resolved
import org.junit.jupiter.api.Test;

Check warning on line 34 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Import

ERROR: The import org.junit.jupiter cannot be resolved

public class MutableObservableSetContractTest extends
MutableObservableCollectionContractTest {
Expand All @@ -46,18 +46,18 @@
}

@Override
@Before
@BeforeEach

Check warning on line 49 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: BeforeEach cannot be resolved to a type
public void setUp() throws Exception {
super.setUp();
set = (IObservableSet) getObservable();
}

@Test

Check warning on line 55 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAdd_SetChangeEvent() throws Exception {
assertSetChangeEventFired(() -> set.add(delegate.createElement(set)), "Set.add(Object)", set);
}

@Test

Check warning on line 60 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAdd_SetDiffEntry() throws Exception {
set.add(delegate.createElement(set));
final Object element = delegate.createElement(set);
Expand All @@ -65,18 +65,18 @@
assertAddDiffEntry(() -> set.add(element), "Set.add(Object)", set, element);
}

@Test

Check warning on line 68 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAdd_GetterCalled() throws Exception {
assertGetterCalled(() -> set.add(delegate.createElement(set)), "Set.add(Object)", set);
}

@Test

Check warning on line 73 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAddAll_SetChangeEvent() throws Exception {
assertSetChangeEventFired(() -> set.addAll(Arrays.asList(new Object[] { delegate.createElement(set) })),
"Set.addAll(Collection", set);
}

@Test

Check warning on line 79 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAddAll_SetDiffEntry() throws Exception {
final Object element = delegate.createElement(set);

Expand All @@ -84,13 +84,13 @@
element);
}

@Test

Check warning on line 87 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testAddAll_GetterCalled() throws Exception {
assertGetterCalled(() -> set.addAll(Collections.singleton(delegate.createElement(set))),
"Set.addAll(Collection)", set);
}

@Test

Check warning on line 93 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRemove_SetChangeEvent() throws Exception {
final Object element = delegate.createElement(set);
set.add(element);
Expand All @@ -98,7 +98,7 @@
assertSetChangeEventFired(() -> set.remove(element), "Set.remove(Object)", set);
}

@Test

Check warning on line 101 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRemove_SetDiffEntry() throws Exception {
set.add(delegate.createElement(set));
final Object element = delegate.createElement(set);
Expand All @@ -107,14 +107,14 @@
assertRemoveDiffEntry(() -> set.remove(element), "Set.remove(Object)", set, element);
}

@Test

Check warning on line 110 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRemove_GetterCalled() throws Exception {
final Object element = delegate.createElement(set);
set.add(element);
assertGetterCalled(() -> set.remove(element), "Set.remove(Object)", set);
}

@Test

Check warning on line 117 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRemoveAll_SetChangeEvent() throws Exception {
final Object element = delegate.createElement(set);
set.add(element);
Expand All @@ -123,7 +123,7 @@
"Set.removeAll(Collection)", set);
}

@Test

Check warning on line 126 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRemoveAll_SetDiffEntry() throws Exception {
final Object element = delegate.createElement(set);
set.add(element);
Expand All @@ -132,14 +132,14 @@
set, element);
}

@Test

Check warning on line 135 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRemoveAll_GetterCalled() throws Exception {
final Object element = delegate.createElement(set);
set.add(element);
assertGetterCalled(() -> set.removeAll(Collections.singleton(element)), "Set.removeAll(Collection)", set);
}

@Test

Check warning on line 142 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRetainAll_SetChangeEvent() throws Exception {
final Object element1 = delegate.createElement(set);
set.add(element1);
Expand All @@ -149,7 +149,7 @@
"Set.retainAll(Collection", set);
}

@Test

Check warning on line 152 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRetainAll_SetDiffEntry() throws Exception {
final Object element1 = delegate.createElement(set);
set.add(element1);
Expand All @@ -160,20 +160,20 @@
"Set.retainAll(Collection)", set, element2);
}

@Test

Check warning on line 163 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testRetainAll_GetterCalled() throws Exception {
set.add(delegate.createElement(set));
assertGetterCalled(() -> set.retainAll(Collections.EMPTY_SET), "Set.retainAll(Collection)", set);
}

@Test

Check warning on line 169 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testClear_SetChangeEvent() throws Exception {
set.add(delegate.createElement(set));

assertSetChangeEventFired(() -> set.clear(), "Set.clear()", set);
}

@Test

Check warning on line 176 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testClear_SetDiffEntry() throws Exception {
Object element = delegate.createElement(set);
set.add(element);
Expand All @@ -181,7 +181,7 @@
assertRemoveDiffEntry(() -> set.clear(), "Set.clear()", set, element);
}

@Test

Check warning on line 184 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Type

ERROR: Test cannot be resolved to a type
public void testClear_GetterCalled() throws Exception {
set.add(delegate.createElement(set));
assertGetterCalled(() -> set.clear(), "Set.clear()", set);
Expand All @@ -206,22 +206,20 @@

runnable.run();

assertEquals(
formatFail(methodName + " should fire one SetChangeEvent."), 1,
setListener.count);
assertEquals(formatFail(methodName
+ "'s change event observable should be the created Set."),
set, setListener.event.getObservable());

assertEquals(
formatFail("Two notifications should have been received."), 2,
queue.size());
assertEquals(formatFail("ChangeEvent of " + methodName
+ " should have fired before the SetChangeEvent."),
changeListener, queue.get(0));
assertEquals(formatFail("SetChangeEvent of " + methodName
+ " should have fired after the ChangeEvent."), setListener,
queue.get(1));
assertEquals(1, setListener.count,

Check warning on line 209 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertEquals(int, int, String) is undefined for the type MutableObservableSetContractTest
formatFail(methodName + " should fire one SetChangeEvent."));
assertEquals(set, setListener.event.getObservable(),

Check warning on line 211 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertEquals(IObservableSet, IObservable, String) is undefined for the type MutableObservableSetContractTest
formatFail(methodName
+ "'s change event observable should be the created Set."));

assertEquals(2, queue.size(),

Check warning on line 215 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertEquals(int, int, String) is undefined for the type MutableObservableSetContractTest
formatFail("Two notifications should have been received."));
assertEquals(changeListener, queue.get(0),

Check warning on line 217 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertEquals(ChangeEventTracker, IObservablesListener, String) is undefined for the type MutableObservableSetContractTest
formatFail("ChangeEvent of " + methodName
+ " should have fired before the SetChangeEvent."));
assertEquals(setListener, queue.get(1),

Check warning on line 220 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertEquals(SetChangeEventTracker, IObservablesListener, String) is undefined for the type MutableObservableSetContractTest
formatFail("SetChangeEvent of " + methodName
+ " should have fired after the ChangeEvent."));
}

/**
Expand All @@ -235,12 +233,12 @@
runnable.run();

Set entries = listener.event.diff.getAdditions();
assertEquals(formatFail(methodName
+ " should result in one diff entry."), 1, entries.size());
assertEquals(1, entries.size(), formatFail(methodName

Check warning on line 236 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertEquals(int, int, String) is undefined for the type MutableObservableSetContractTest
+ " should result in one diff entry."));

assertTrue(formatFail(methodName
+ " should result in a diff entry that is an addition."),
entries.contains(element));
assertTrue(entries.contains(element),

Check warning on line 239 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertTrue(boolean, String) is undefined for the type MutableObservableSetContractTest
formatFail(methodName
+ " should result in a diff entry that is an addition."));
}

/**
Expand All @@ -254,11 +252,11 @@
runnable.run();

Set entries = listener.event.diff.getRemovals();
assertEquals(formatFail(methodName
+ " should result in one diff entry."), 1, entries.size());
assertEquals(1, entries.size(), formatFail(methodName

Check warning on line 255 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertEquals(int, int, String) is undefined for the type MutableObservableSetContractTest
+ " should result in one diff entry."));

assertTrue(formatFail(methodName
+ " should result in a diff entry that is a removal."),
entries.contains(element));
assertTrue(entries.contains(element),

Check warning on line 258 in tests/org.eclipse.jface.tests.databinding.conformance/src/org/eclipse/jface/databinding/conformance/MutableObservableSetContractTest.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Member

ERROR: The method assertTrue(boolean, String) is undefined for the type MutableObservableSetContractTest
formatFail(methodName
+ " should result in a diff entry that is a removal."));
}
}
Loading
Loading