Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2011-03-03 00:27:58 +0000
committerspingel2011-03-03 00:27:58 +0000
commit6f8fd9d3c75567061716b7ffb6a38c7964d46d7e (patch)
tree40d22cf6e4adbec8251516e2b70a43b8e8185829 /org.eclipse.mylyn.tasks.tests/src
parentd4ec53f9f4b7977fd909cf2423ad2a5bbc4a3209 (diff)
downloadorg.eclipse.mylyn.tasks-6f8fd9d3c75567061716b7ffb6a38c7964d46d7e.tar.gz
org.eclipse.mylyn.tasks-6f8fd9d3c75567061716b7ffb6a38c7964d46d7e.tar.xz
org.eclipse.mylyn.tasks-6f8fd9d3c75567061716b7ffb6a38c7964d46d7e.zip
NEW - bug 316233: reformat source code
https://bugs.eclipse.org/bugs/show_bug.cgi?id=316233
Diffstat (limited to 'org.eclipse.mylyn.tasks.tests/src')
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CommentGroupStrategyTest.java6
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/NewTaskWizardRepositorySelectionTest.java6
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RefactorRepositoryUrlOperationTest.java4
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/StackTraceDuplicateDetectorTest.java4
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTimingTest.java10
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskExportImportTest.java1
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListExternalizationTest.java5
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryTest.java4
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/ContextPerspectiveManagerTest.java15
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/TaskListSynchronizationSchedulerTest.java5
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/editor/TaskUrlHyperlinkDetectorTest.java6
11 files changed, 37 insertions, 29 deletions
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CommentGroupStrategyTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CommentGroupStrategyTest.java
index 5300c305e..7eaf76836 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CommentGroupStrategyTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CommentGroupStrategyTest.java
@@ -216,8 +216,10 @@ public class CommentGroupStrategyTest extends TestCase {
comments.add(mockComment(i + 1, MOCK_CURRENT_PERSON_ID, new Date(i + 1)));
}
- boolean isCurrent = strategy.isCurrent(comments, mockComment(CommentGroupStrategy.MAX_CURRENT + 1,
- MOCK_CURRENT_PERSON_ID, new Date(CommentGroupStrategy.MAX_CURRENT + 1)), MOCK_CURRENT_PERSON_ID);
+ boolean isCurrent = strategy.isCurrent(
+ comments,
+ mockComment(CommentGroupStrategy.MAX_CURRENT + 1, MOCK_CURRENT_PERSON_ID, new Date(
+ CommentGroupStrategy.MAX_CURRENT + 1)), MOCK_CURRENT_PERSON_ID);
assertEquals(false, isCurrent);
}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/NewTaskWizardRepositorySelectionTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/NewTaskWizardRepositorySelectionTest.java
index 4ddaed288..bb38fb570 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/NewTaskWizardRepositorySelectionTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/NewTaskWizardRepositorySelectionTest.java
@@ -82,8 +82,10 @@ public class NewTaskWizardRepositorySelectionTest extends TestCase {
dialog.open();
SelectRepositoryPage page = (SelectRepositoryPage) wizard.getPages()[0];
- TaskRepository localRepository = TasksUiPlugin.getRepositoryManager().getRepositories(
- LocalRepositoryConnector.CONNECTOR_KIND).iterator().next();
+ TaskRepository localRepository = TasksUiPlugin.getRepositoryManager()
+ .getRepositories(LocalRepositoryConnector.CONNECTOR_KIND)
+ .iterator()
+ .next();
assertEquals(localRepository, ((IStructuredSelection) page.getViewer().getSelection()).getFirstElement());
wizard.dispose();
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RefactorRepositoryUrlOperationTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RefactorRepositoryUrlOperationTest.java
index ac2cf03cd..382685ee3 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RefactorRepositoryUrlOperationTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RefactorRepositoryUrlOperationTest.java
@@ -171,8 +171,8 @@ public class RefactorRepositoryUrlOperationTest extends TestCase {
metaContext = ContextCorePlugin.getContextManager().getActivityMetaContext();
assertEquals(2, metaContext.getInteractionHistory().size());
assertEquals(60 * 1000 * 5, TasksUiPlugin.getTaskActivityManager().getElapsedTime(new MockTask(secondUrl, "1")));
- assertEquals(2 * 60 * 1000 * 5, TasksUiPlugin.getTaskActivityManager().getElapsedTime(
- new MockTask(secondUrl, "2")));
+ assertEquals(2 * 60 * 1000 * 5,
+ TasksUiPlugin.getTaskActivityManager().getElapsedTime(new MockTask(secondUrl, "2")));
assertEquals(secondUrl + "-1", metaContext.getInteractionHistory().get(0).getStructureHandle());
}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/StackTraceDuplicateDetectorTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/StackTraceDuplicateDetectorTest.java
index a3929262e..5562b7acc 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/StackTraceDuplicateDetectorTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/StackTraceDuplicateDetectorTest.java
@@ -34,8 +34,8 @@ public class StackTraceDuplicateDetectorTest extends TestCase {
public void testStackTraceWithAppendedText() throws Exception {
String stackTrace = "java.lang.NullPointerException\nat jeff.testing.stack.trace.functionality(jeff.java:481)";
String extraText = "\nExtra text that isnt' part of the stack trace java:";
- assertEquals(stackTrace + "\n", StackTraceDuplicateDetector.getStackTraceFromDescription(extraText + "\n"
- + stackTrace + "\n"));
+ assertEquals(stackTrace + "\n",
+ StackTraceDuplicateDetector.getStackTraceFromDescription(extraText + "\n" + stackTrace + "\n"));
}
public void testStackTraceMisaligned() throws Exception {
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTimingTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTimingTest.java
index c881c7d70..e35a45211 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTimingTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTimingTest.java
@@ -249,8 +249,9 @@ public class TaskActivityTimingTest extends TestCase {
assertEquals(expectedTotalTime, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1, start2, end2));
assertEquals(2 * expectedTotalTime, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1, start, end2));
- MonitorUiPlugin.getDefault().getActivityContextManager().removeActivityTime(task1.getHandleIdentifier(),
- start.getTimeInMillis(), end.getTimeInMillis());
+ MonitorUiPlugin.getDefault()
+ .getActivityContextManager()
+ .removeActivityTime(task1.getHandleIdentifier(), start.getTimeInMillis(), end.getTimeInMillis());
// Half gone since end date is exclusive (removes up to but not including hour)
assertEquals(expectedTotalTime, activityManager.getElapsedTime(task1));
@@ -260,8 +261,9 @@ public class TaskActivityTimingTest extends TestCase {
assertEquals(expectedTotalTime, activityManager.getElapsedTime(task1));
- MonitorUiPlugin.getDefault().getActivityContextManager().removeActivityTime(task1.getHandleIdentifier(),
- start2.getTimeInMillis(), end2.getTimeInMillis());
+ MonitorUiPlugin.getDefault()
+ .getActivityContextManager()
+ .removeActivityTime(task1.getHandleIdentifier(), start2.getTimeInMillis(), end2.getTimeInMillis());
assertEquals(0, activityManager.getElapsedTime(task1));
}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskExportImportTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskExportImportTest.java
index 77ea70548..35c9b5a90 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskExportImportTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskExportImportTest.java
@@ -14,7 +14,6 @@ package org.eclipse.mylyn.tasks.tests;
import org.eclipse.mylyn.context.tests.AbstractContextTest;
/**
- *
* @author Jevgeni Holodkov
*/
//FIXME fix test
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListExternalizationTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListExternalizationTest.java
index c45e7b654..64f0b716a 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListExternalizationTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListExternalizationTest.java
@@ -54,8 +54,9 @@ public class TaskListExternalizationTest extends TestCase {
@Override
protected void setUp() throws Exception {
super.setUp();
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(
- ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED, false);
+ TasksUiPlugin.getDefault()
+ .getPreferenceStore()
+ .setValue(ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED, false);
TaskTestUtil.resetTaskListAndRepositories();
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryTest.java
index 8e0e67f34..f3d33e2d1 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryTest.java
@@ -33,8 +33,8 @@ public class TaskRepositoryTest extends TestCase {
public void testPlatformAuthHandlerAvailable() throws Exception {
URL url = new URL("http://mylyn");
Platform.addAuthorizationInfo(url, "", "", Collections.EMPTY_MAP);
- assertNotNull("Tests require org.eclipse.core.runtime.compatibility.auth", Platform.getAuthorizationInfo(url,
- "", ""));
+ assertNotNull("Tests require org.eclipse.core.runtime.compatibility.auth",
+ Platform.getAuthorizationInfo(url, "", ""));
}
public void testLabel() {
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/ContextPerspectiveManagerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/ContextPerspectiveManagerTest.java
index adf6b3e6c..27598ad0a 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/ContextPerspectiveManagerTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/ContextPerspectiveManagerTest.java
@@ -38,16 +38,19 @@ public class ContextPerspectiveManagerTest extends TestCase {
ContextTestUtil.triggerContextUiLazyStart();
TaskTestUtil.resetTaskListAndRepositories();
- previousSetting = ContextUiPlugin.getDefault().getPreferenceStore().getBoolean(
- IContextUiPreferenceContstants.AUTO_MANAGE_PERSPECTIVES);
- ContextUiPlugin.getDefault().getPreferenceStore().setValue(
- IContextUiPreferenceContstants.AUTO_MANAGE_PERSPECTIVES, true);
+ previousSetting = ContextUiPlugin.getDefault()
+ .getPreferenceStore()
+ .getBoolean(IContextUiPreferenceContstants.AUTO_MANAGE_PERSPECTIVES);
+ ContextUiPlugin.getDefault()
+ .getPreferenceStore()
+ .setValue(IContextUiPreferenceContstants.AUTO_MANAGE_PERSPECTIVES, true);
}
@Override
protected void tearDown() throws Exception {
- ContextUiPlugin.getDefault().getPreferenceStore().setValue(
- IContextUiPreferenceContstants.AUTO_MANAGE_PERSPECTIVES, previousSetting);
+ ContextUiPlugin.getDefault()
+ .getPreferenceStore()
+ .setValue(IContextUiPreferenceContstants.AUTO_MANAGE_PERSPECTIVES, previousSetting);
TaskTestUtil.resetTaskListAndRepositories();
}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/TaskListSynchronizationSchedulerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/TaskListSynchronizationSchedulerTest.java
index 5bce51cc9..d6b6345b6 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/TaskListSynchronizationSchedulerTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/TaskListSynchronizationSchedulerTest.java
@@ -67,8 +67,9 @@ public class TaskListSynchronizationSchedulerTest extends TestCase {
@Override
protected void setUp() throws Exception {
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(
- ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED, false);
+ TasksUiPlugin.getDefault()
+ .getPreferenceStore()
+ .setValue(ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED, false);
TaskTestUtil.resetTaskListAndRepositories();
repository = TaskTestUtil.createMockRepository();
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/editor/TaskUrlHyperlinkDetectorTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/editor/TaskUrlHyperlinkDetectorTest.java
index 7207646a7..d043987f3 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/editor/TaskUrlHyperlinkDetectorTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/editor/TaskUrlHyperlinkDetectorTest.java
@@ -186,8 +186,7 @@ public class TaskUrlHyperlinkDetectorTest extends TestCase {
*/
public void testDetectionNoRepositoryRepositoryUrl() {
repository = null;
- TaskRepository repository1 = new TaskRepository(MockRepositoryConnector.CONNECTOR_KIND,
- "http://repo1.test/foo");
+ TaskRepository repository1 = new TaskRepository(MockRepositoryConnector.CONNECTOR_KIND, "http://repo1.test/foo");
try {
TasksUi.getRepositoryManager().addRepository(repository1);
@@ -206,8 +205,7 @@ public class TaskUrlHyperlinkDetectorTest extends TestCase {
*/
public void testDetectionNoRepositoryMultipleRepositoryUrls() {
repository = null;
- TaskRepository repository1 = new TaskRepository(MockRepositoryConnector.CONNECTOR_KIND,
- "http://repo1.test/foo");
+ TaskRepository repository1 = new TaskRepository(MockRepositoryConnector.CONNECTOR_KIND, "http://repo1.test/foo");
TaskRepository repository2 = new TaskRepository(MockRepositoryConnector.CONNECTOR_KIND, "http://repo2.test");
try {
TasksUi.getRepositoryManager().addRepository(repository1);

Back to the top