diff --git a/core/diirt/diirt-plugins/org.csstudio.diirt.util.core.preferences.test/src/org/csstudio/diirt/util/core/preferences/pojo/jaxb.properties b/core/diirt/diirt-plugins/org.csstudio.diirt.util.core.preferences.test/src/org/csstudio/diirt/util/core/preferences/pojo/jaxb.properties new file mode 100644 index 00000000000..4d30ef6ef50 --- /dev/null +++ b/core/diirt/diirt-plugins/org.csstudio.diirt.util.core.preferences.test/src/org/csstudio/diirt/util/core/preferences/pojo/jaxb.properties @@ -0,0 +1 @@ +javax.xml.bind.context.factory=com.sun.xml.bind.v2.ContextFactory diff --git a/core/pom.xml b/core/pom.xml index 8c8dffdb2c4..e7532e779cf 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -93,7 +93,7 @@ jacoco-maven-plugin - [0.5.3.201107060350,) + [0.8.3,) prepare-agent @@ -269,7 +269,7 @@ org.jacoco jacoco-maven-plugin - 0.5.3.201107060350 + 0.8.3 * ${project.basedir}/../target/jacoco.exec diff --git a/core/ui/ui-plugins/org.csstudio.perspectives.test/src/org/csstudio/perspectives/PerspectiveSaverUnitTest.java b/core/ui/ui-plugins/org.csstudio.perspectives.test/src/org/csstudio/perspectives/PerspectiveSaverUnitTest.java index b618e5a2e00..4321a72bdf0 100644 --- a/core/ui/ui-plugins/org.csstudio.perspectives.test/src/org/csstudio/perspectives/PerspectiveSaverUnitTest.java +++ b/core/ui/ui-plugins/org.csstudio.perspectives.test/src/org/csstudio/perspectives/PerspectiveSaverUnitTest.java @@ -9,9 +9,7 @@ import static org.junit.Assert.assertEquals; import static org.mockito.Matchers.any; -import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.eq; -import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; @@ -28,9 +26,7 @@ import org.eclipse.core.runtime.preferences.IEclipsePreferences; import org.eclipse.core.runtime.preferences.IPreferencesService; -import org.eclipse.core.runtime.preferences.IScopeContext; import org.eclipse.e4.core.services.events.IEventBroker; -import org.eclipse.e4.ui.model.application.ui.MSnippetContainer; import org.eclipse.e4.ui.model.application.ui.MUIElement; import org.eclipse.e4.ui.model.application.ui.advanced.MPerspective; import org.eclipse.e4.ui.model.application.ui.advanced.MPlaceholder; @@ -82,11 +78,9 @@ public class PerspectiveSaverUnitTest { public void setUp() { try { URL workspaceUrl = new URL("file:" + workspaceLocation); - when(instanceLocation.getDataArea(anyString())).thenReturn(workspaceUrl); - doNothing().when(preferences).put(anyString(), anyString()); - when(prefsService.getString(anyString(), anyString(), anyString(), any(IScopeContext[].class))).thenReturn("dummy"); + when(prefsService.getString(any(), any(), any(), any())).thenReturn("dummy"); // Return first argument if cloneElement() is called on mockModelService. - when(mockModelService.cloneElement(any(MUIElement.class), any(MSnippetContainer.class))).thenAnswer(new Answer() { + when(mockModelService.cloneElement(any(), any())).thenAnswer(new Answer() { @Override public MUIElement answer(InvocationOnMock invocation) { Object[] args = invocation.getArguments(); @@ -119,7 +113,6 @@ public void handleEventIgnoresEventsWherePropertiesAreNotMPerspectives() { @Test public void handleEventIgnoresEventsIfNoSaveDirPreferenceIsSet() { // Return null from preference query. - when(prefsService.getString(anyString(), anyString(), anyString(), any(IScopeContext[].class))).thenReturn(null); Event testEvent = createTestEvent(UIEvents.EventTags.ELEMENT, new Object()); saver.handleEvent(testEvent); verify(mockModelService, never()).findElements(any(MUIElement.class), any(String.class), any(Class.class), any(List.class));