Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-06-25 04:57:29 +0000
committermkersten2007-06-25 04:57:29 +0000
commitc0327370082f76161881bdb9ba6a6ff7559b3ab0 (patch)
treebb4da932dedca29c57a1bf372071ed2ef8a86706 /org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn
parent09f537e346aa5325d85c4afbc35e4ffe636af7a6 (diff)
downloadorg.eclipse.mylyn.tasks-c0327370082f76161881bdb9ba6a6ff7559b3ab0.tar.gz
org.eclipse.mylyn.tasks-c0327370082f76161881bdb9ba6a6ff7559b3ab0.tar.xz
org.eclipse.mylyn.tasks-c0327370082f76161881bdb9ba6a6ff7559b3ab0.zip
RESOLVED - bug 194138: cleanup unnecesary casts and null checks
https://bugs.eclipse.org/bugs/show_bug.cgi?id=194138
Diffstat (limited to 'org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn')
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilTest.java34
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientRepositoryTest.java17
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientSearchTest.java5
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientTest.java5
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java2
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java8
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TestProxy.java18
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracAttachmentHandlerTest.java47
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientFactoryTest.java16
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientManagerTest.java33
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientProxyTest.java16
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracQueryTest.java2
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java24
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryQueryTest.java15
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositorySettingsPageTest.java7
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskDataHandlerTest.java3
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTestConstants.java4
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracWebClientTest.java4
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcClientSearchTest.java6
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java12
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestCleanupUtil.java4
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestFixture.java8
22 files changed, 161 insertions, 129 deletions
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilTest.java
index 028e58a64..363ce5c34 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilTest.java
@@ -1,7 +1,5 @@
package org.eclipse.mylyn.internal.trac.ui;
-
-
import junit.framework.TestCase;
import org.eclipse.jface.text.Region;
@@ -27,7 +25,7 @@ public class TracHyperlinkUtilTest extends TestCase {
assertNotNull(links);
assertEquals(1, links.length);
assertEquals(new Region(0, 20), links[0].getHyperlinkRegion());
- assertEquals("12", ((TaskHyperlink)links[0]).getTaskId());
+ assertEquals("12", ((TaskHyperlink) links[0]).getTaskId());
}
public void testFindHyperlinksTicket() {
@@ -35,18 +33,18 @@ public class TracHyperlinkUtilTest extends TestCase {
assertNotNull(links);
assertEquals(1, links.length);
assertEquals(new Region(0, 3), links[0].getHyperlinkRegion());
- assertEquals("11", ((TaskHyperlink)links[0]).getTaskId());
+ assertEquals("11", ((TaskHyperlink) links[0]).getTaskId());
links = TracHyperlinkUtil.findHyperlinks(repository, "#11, #234", 6, 0);
assertNotNull(links);
assertEquals(1, links.length);
- assertEquals("234", ((TaskHyperlink)links[0]).getTaskId());
+ assertEquals("234", ((TaskHyperlink) links[0]).getTaskId());
links = TracHyperlinkUtil.findHyperlinks(repository, " ticket:123 ", 2, 0);
assertNotNull(links);
assertEquals(1, links.length);
assertEquals(new Region(2, 10), links[0].getHyperlinkRegion());
- assertEquals("123", ((TaskHyperlink)links[0]).getTaskId());
+ assertEquals("123", ((TaskHyperlink) links[0]).getTaskId());
}
public void testFindHyperlinksReport() {
@@ -54,7 +52,7 @@ public class TracHyperlinkUtilTest extends TestCase {
assertEquals(1, links.length);
assertEquals(new Region(0, 10), links[0].getHyperlinkRegion());
assertEquals("http://localhost/report/123", ((WebHyperlink) links[0]).getURLString());
-
+
links = TracHyperlinkUtil.findHyperlinks(repository, "{123}", 0, 0);
assertEquals(1, links.length);
assertEquals(new Region(0, 5), links[0].getHyperlinkRegion());
@@ -116,15 +114,21 @@ public class TracHyperlinkUtilTest extends TestCase {
assertEquals(1, links.length);
assertEquals("http://localhost/changeset/?new=456&old=123", ((WebHyperlink) links[0]).getURLString());
- links = TracHyperlinkUtil.findHyperlinks(repository, "diff:trunk/trac@3538//sandbox/vc-refactoring/trac@3539", 0, 0);
+ links = TracHyperlinkUtil.findHyperlinks(repository, "diff:trunk/trac@3538//sandbox/vc-refactoring/trac@3539",
+ 0, 0);
assertNotNull(links);
assertEquals(1, links.length);
- assertEquals("http://localhost/changeset/?new_path=sandbox%2Fvc-refactoring%2Ftrac&old_path=trunk%2Ftrac&new=3539&old=3538", ((WebHyperlink) links[0]).getURLString());
+ assertEquals(
+ "http://localhost/changeset/?new_path=sandbox%2Fvc-refactoring%2Ftrac&old_path=trunk%2Ftrac&new=3539&old=3538",
+ ((WebHyperlink) links[0]).getURLString());
- links = TracHyperlinkUtil.findHyperlinks(repository, "diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default", 0, 0);
+ links = TracHyperlinkUtil.findHyperlinks(repository,
+ "diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default", 0, 0);
assertNotNull(links);
assertEquals(1, links.length);
- assertEquals("http://localhost/changeset/?new_path=tags%2Ftrac-0.9.3%2Fwiki-default&old_path=tags%2Ftrac-0.9.2%2Fwiki-default", ((WebHyperlink) links[0]).getURLString());
+ assertEquals(
+ "http://localhost/changeset/?new_path=tags%2Ftrac-0.9.3%2Fwiki-default&old_path=tags%2Ftrac-0.9.2%2Fwiki-default",
+ ((WebHyperlink) links[0]).getURLString());
}
public void testFindHyperlinksWiki() {
@@ -146,7 +150,7 @@ public class TracHyperlinkUtilTest extends TestCase {
links = TracHyperlinkUtil.findHyperlinks(repository, "paGe", 0, 0);
assertNull(links);
-
+
links = TracHyperlinkUtil.findHyperlinks(repository, "WikiPage", 0, 0);
assertNotNull(links);
assertEquals(1, links.length);
@@ -161,11 +165,11 @@ public class TracHyperlinkUtilTest extends TestCase {
assertEquals(1, links.length);
assertEquals("http://localhost/milestone/1.0", ((WebHyperlink) links[0]).getURLString());
}
-
+
public void testFindHyperlinksAttachment() {
IHyperlink[] links = TracHyperlinkUtil.findHyperlinks(repository, "attachment:ticket:123:foo.bar", 1, 0);
assertNotNull(links);
- assertEquals("123", ((TaskHyperlink)links[0]).getTaskId());
+ assertEquals("123", ((TaskHyperlink) links[0]).getTaskId());
}
public void testFindHyperlinksFiles() {
@@ -173,7 +177,7 @@ public class TracHyperlinkUtilTest extends TestCase {
assertNotNull(links);
assertEquals(1, links.length);
assertEquals("http://localhost/browser/trunk/foo", ((WebHyperlink) links[0]).getURLString());
-
+
links = TracHyperlinkUtil.findHyperlinks(repository, "source:trunk/foo@123", 1, 0);
assertNotNull(links);
assertEquals(1, links.length);
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientRepositoryTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientRepositoryTest.java
index 3b329148a..9c9a5012a 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientRepositoryTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientRepositoryTest.java
@@ -36,23 +36,23 @@ public class AbstractTracClientRepositoryTest extends AbstractTracClientTest {
public void testValidate010() throws Exception {
validate(TracTestConstants.TEST_TRAC_010_URL);
- }
+ }
public void testValidate010DigestAuth() throws Exception {
validate(TracTestConstants.TEST_TRAC_010_DIGEST_AUTH_URL);
- }
+ }
public void testValidate011() throws Exception {
validate(TracTestConstants.TEST_TRAC_011_URL);
- }
+ }
public void testValidate010FormAuth() throws Exception {
validate(TracTestConstants.TEST_TRAC_010_FORM_AUTH_URL);
}
-
+
protected void validate(String url) throws Exception {
Credentials credentials = TestUtil.readCredentials(PrivilegeLevel.USER);
-
+
// standard connect
connect(url);
repository.validate();
@@ -83,13 +83,14 @@ public class AbstractTracClientRepositoryTest extends AbstractTracClientTest {
}
public void testProxy() throws Exception {
- connect(TracTestConstants.TEST_TRAC_010_URL, "", "", new Proxy(Type.HTTP, new InetSocketAddress("invalidhostname", 8080)));
+ connect(TracTestConstants.TEST_TRAC_010_URL, "", "", new Proxy(Type.HTTP, new InetSocketAddress(
+ "invalidhostname", 8080)));
try {
repository.validate();
fail("Expected IOException");
} catch (TracException e) {
}
-
+
connect(TracTestConstants.TEST_TRAC_010_URL, "", "", null);
repository.setProxy(new Proxy(Type.HTTP, new InetSocketAddress("invalidhostname", 8080)));
try {
@@ -108,5 +109,5 @@ public class AbstractTracClientRepositoryTest extends AbstractTracClientTest {
}
}
-
+
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientSearchTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientSearchTest.java
index 2f0fa6cd5..8df5d4fdb 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientSearchTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientSearchTest.java
@@ -26,8 +26,7 @@ import org.eclipse.mylyn.trac.tests.support.XmlRpcServer.TestData;
import org.eclipse.mylyn.trac.tests.support.XmlRpcServer.Ticket;
/**
- * Test cases that validate search results for classes that implement
- * {@link ITracClient}.
+ * Test cases that validate search results for classes that implement {@link ITracClient}.
*
* @author Steffen Pingel
*/
@@ -76,7 +75,7 @@ public abstract class AbstractTracClientSearchTest extends AbstractTracClientTes
// XXX need to fix bug 175211
return;
}
-
+
connect011();
getTickets();
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientTest.java
index 8625c321f..ce3d01db2 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientTest.java
@@ -53,7 +53,7 @@ public abstract class AbstractTracClientTest extends TestCase {
public AbstractTracClientTest() {
this(null, PrivilegeLevel.USER);
}
-
+
public ITracClient connect096() throws Exception {
return connect(TracTestConstants.TEST_TRAC_096_URL);
}
@@ -87,7 +87,8 @@ public abstract class AbstractTracClientTest extends TestCase {
return connect(url, username, password, proxy, version);
}
- public ITracClient connect(String url, String username, String password, Proxy proxy, Version version) throws Exception {
+ public ITracClient connect(String url, String username, String password, Proxy proxy, Version version)
+ throws Exception {
this.repositoryUrl = url;
this.username = username;
this.password = password;
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java
index faa9f40b8..a741e8d5c 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java
@@ -24,7 +24,7 @@ public class AllTracTests {
public static Test suite() {
// UrlConnectionUtil.initCommonsLoggingSettings();
-
+
TestSuite suite = new TestSuite("Test for org.eclipse.mylyn.trac.tests");
// $JUnit-BEGIN$
// suite.addTestSuite(TracXmlRpcTest.class);
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java
index 6ce602c42..89606aa9e 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java
@@ -77,12 +77,12 @@ public class RepositorySearchQueryTest extends TestCase {
TracSearch search = new TracSearch();
String queryUrl = repository.getUrl() + ITracClient.QUERY_URL + search.toUrl();
TracRepositoryQuery query = new TracRepositoryQuery(repository.getUrl(), queryUrl, "description");
- SearchHitCollector collector = new SearchHitCollector(TasksUiPlugin.getTaskListManager()
- .getTaskList(), repository, query, new TaskFactory(repository, false, false));
-
+ SearchHitCollector collector = new SearchHitCollector(TasksUiPlugin.getTaskListManager().getTaskList(),
+ repository, query, new TaskFactory(repository, false, false));
+
collector.run(new NullProgressMonitor());
for (AbstractTask task : collector.getTasks()) {
- assertEquals(TracTestConstants.TEST_TRAC_096_URL, task.getRepositoryUrl());
+ assertEquals(TracTestConstants.TEST_TRAC_096_URL, task.getRepositoryUrl());
}
assertEquals(data.tickets.size(), collector.getTasks().size());
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TestProxy.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TestProxy.java
index 21479069c..d3b1406fb 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TestProxy.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TestProxy.java
@@ -30,11 +30,11 @@ public class TestProxy implements Runnable {
private IOException exception;
private volatile boolean stopped = false;
-
+
public TestProxy(int listenPort) {
this.listenPort = listenPort;
}
-
+
public TestProxy() {
}
@@ -44,7 +44,7 @@ public class TestProxy implements Runnable {
}
return listenPort;
}
-
+
public void start() {
runner = new Thread(this, "TestProxy :" + listenPort);
runner.start();
@@ -57,21 +57,21 @@ public class TestProxy implements Runnable {
Thread.sleep(100);
return port;
}
-
+
public void run() {
ServerSocket serverSocket = null;
try {
serverSocket = new ServerSocket(listenPort);
synchronized (this) {
listenPort = serverSocket.getLocalPort();
- notifyAll();
+ notifyAll();
}
while (!stopped) {
Socket socket = serverSocket.accept();
try {
Message request = readMessage(socket.getInputStream());
setRequest(request);
-
+
Message response = waitForResponse();
writeMessage(response, socket.getOutputStream());
} finally {
@@ -205,7 +205,7 @@ public class TestProxy implements Runnable {
int i = request.indexOf(" ");
return (i != -1) ? request.substring(0, i) : request;
}
-
+
}
public static void main(String[] args) {
@@ -221,7 +221,7 @@ public class TestProxy implements Runnable {
} finally {
proxy.stop();
}
-
+
}
-
+
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracAttachmentHandlerTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracAttachmentHandlerTest.java
index eb418888e..9e63498bd 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracAttachmentHandlerTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracAttachmentHandlerTest.java
@@ -94,17 +94,20 @@ public class TracAttachmentHandlerTest extends TestCase {
public void testDownloadAttachmentXmlRpc011() throws Exception {
downloadAttachmentXmlRpc(TracTestConstants.TEST_TRAC_011_URL);
}
-
+
private void downloadAttachmentXmlRpc(String url) throws Exception {
init(url, Version.XML_RPC);
- TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "", new NullProgressMonitor());
+ TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "",
+ new NullProgressMonitor());
TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
-
+ RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(),
+ task.getTaskId());
+
assertTrue(taskData.getAttachments().size() > 0);
File file = File.createTempFile("attachment", null);
file.deleteOnExit();
- attachmentHandler.downloadAttachment(repository, taskData.getAttachments().get(0), new FileOutputStream(file), new NullProgressMonitor());
+ attachmentHandler.downloadAttachment(repository, taskData.getAttachments().get(0), new FileOutputStream(file),
+ new NullProgressMonitor());
byte[] result = new byte[6];
InputStream in = new FileInputStream(file);
@@ -120,19 +123,22 @@ public class TracAttachmentHandlerTest extends TestCase {
public void testGetAttachmentDataXmlRpc010() throws Exception {
getAttachmentDataXmlRpc(TracTestConstants.TEST_TRAC_010_URL);
}
-
+
public void testGetAttachmentDataXmlRpc011() throws Exception {
getAttachmentDataXmlRpc(TracTestConstants.TEST_TRAC_011_URL);
}
private void getAttachmentDataXmlRpc(String url) throws Exception {
init(url, Version.XML_RPC);
- TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "", new NullProgressMonitor());
+ TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "",
+ new NullProgressMonitor());
TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
-
+ RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(),
+ task.getTaskId());
+
assertTrue(taskData.getAttachments().size() > 0);
- InputStream in = attachmentHandler.getAttachmentAsStream(repository,taskData.getAttachments().get(0), new NullProgressMonitor());
+ InputStream in = attachmentHandler.getAttachmentAsStream(repository, taskData.getAttachments().get(0),
+ new NullProgressMonitor());
byte[] result = new byte[6];
try {
in.read(result);
@@ -145,14 +151,15 @@ public class TracAttachmentHandlerTest extends TestCase {
public void testUploadAttachmentXmlRpc010() throws Exception {
uploadAttachmentXmlRpc(TracTestConstants.TEST_TRAC_010_URL);
}
-
+
public void testUploadAttachmentXmlRpc011() throws Exception {
uploadAttachmentXmlRpc(TracTestConstants.TEST_TRAC_011_URL);
}
-
+
private void uploadAttachmentXmlRpc(String url) throws Exception {
init(url, Version.XML_RPC);
- TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "", new NullProgressMonitor());
+ TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "",
+ new NullProgressMonitor());
File file = File.createTempFile("attachment", null);
file.deleteOnExit();
OutputStream out = new FileOutputStream(file);
@@ -174,25 +181,29 @@ public class TracAttachmentHandlerTest extends TestCase {
public void testCanUploadAttachmentXmlRpc() throws CoreException {
init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
- TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "", new NullProgressMonitor());
+ TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "",
+ new NullProgressMonitor());
assertTrue(attachmentHandler.canUploadAttachment(repository, task));
}
public void testCanUploadAttachmentWeb() throws CoreException {
init(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
- TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "", new NullProgressMonitor());
+ TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "",
+ new NullProgressMonitor());
assertFalse(attachmentHandler.canUploadAttachment(repository, task));
}
public void testCanDownloadAttachmentXmlRpc() throws Exception {
init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
- TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "", new NullProgressMonitor());
+ TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "",
+ new NullProgressMonitor());
assertTrue(attachmentHandler.canDownloadAttachment(repository, task));
}
-
+
public void testCanDownloadAttachmentWeb() throws Exception {
init(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
- TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "", new NullProgressMonitor());
+ TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "",
+ new NullProgressMonitor());
assertFalse(attachmentHandler.canDownloadAttachment(repository, task));
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientFactoryTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientFactoryTest.java
index c3fb8698b..d7b71c8da 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientFactoryTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientFactoryTest.java
@@ -32,21 +32,25 @@ import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
public class TracClientFactoryTest extends TestCase {
public void testCreateClient() throws Exception {
- ITracClient client = TracClientFactory.createClient(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9, "user",
- "password", Proxy.NO_PROXY);
+ ITracClient client = TracClientFactory.createClient(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9,
+ "user", "password", Proxy.NO_PROXY);
assertTrue(client instanceof TracWebClient);
- client = TracClientFactory.createClient(TracTestConstants.TEST_TRAC_010_SSL_URL, Version.TRAC_0_9, "user", "password", Proxy.NO_PROXY);
+ client = TracClientFactory.createClient(TracTestConstants.TEST_TRAC_010_SSL_URL, Version.TRAC_0_9, "user",
+ "password", Proxy.NO_PROXY);
assertTrue(client instanceof TracWebClient);
- client = TracClientFactory.createClient(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC, "user", "password", Proxy.NO_PROXY);
+ client = TracClientFactory.createClient(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC, "user",
+ "password", Proxy.NO_PROXY);
assertTrue(client instanceof TracXmlRpcClient);
- client = TracClientFactory.createClient(TracTestConstants.TEST_TRAC_010_SSL_URL, Version.XML_RPC, "user", "password", Proxy.NO_PROXY);
+ client = TracClientFactory.createClient(TracTestConstants.TEST_TRAC_010_SSL_URL, Version.XML_RPC, "user",
+ "password", Proxy.NO_PROXY);
assertTrue(client instanceof TracXmlRpcClient);
}
public void testCreateClientNull() throws Exception {
try {
- TracClientFactory.createClient(TracTestConstants.TEST_TRAC_010_URL, null, "user", "password", Proxy.NO_PROXY);
+ TracClientFactory.createClient(TracTestConstants.TEST_TRAC_010_URL, null, "user", "password",
+ Proxy.NO_PROXY);
fail("Expected Exception");
} catch (Exception e) {
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientManagerTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientManagerTest.java
index 41ec77b77..c508bd402 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientManagerTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientManagerTest.java
@@ -30,36 +30,39 @@ import org.eclipse.mylyn.tasks.core.TaskRepository;
public class TracClientManagerTest extends TestCase {
public void testNullCache() throws Exception {
- TaskRepository taskRepository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND, TracTestConstants.TEST_TRAC_096_URL);
+ TaskRepository taskRepository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND,
+ TracTestConstants.TEST_TRAC_096_URL);
taskRepository.setVersion(Version.TRAC_0_9.name());
-
+
TracClientManager manager = new TracClientManager(null);
ITracClient client = manager.getRepository(taskRepository);
- assertNull(client.getMilestones());
-
+ assertNull(client.getMilestones());
+
manager.writeCache();
- assertNull(client.getMilestones());
+ assertNull(client.getMilestones());
}
public void testReadCache() throws Exception {
- TaskRepository taskRepository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND, TracTestConstants.TEST_TRAC_096_URL);
+ TaskRepository taskRepository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND,
+ TracTestConstants.TEST_TRAC_096_URL);
taskRepository.setVersion(Version.TRAC_0_9.name());
-
+
File file = File.createTempFile("mylar", null);
file.deleteOnExit();
-
+
TracClientManager manager = new TracClientManager(file);
ITracClient client = manager.getRepository(taskRepository);
- assertNull(client.getMilestones());
+ assertNull(client.getMilestones());
}
-
+
public void testWriteCache() throws Exception {
- TaskRepository taskRepository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND, TracTestConstants.TEST_TRAC_096_URL);
+ TaskRepository taskRepository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND,
+ TracTestConstants.TEST_TRAC_096_URL);
taskRepository.setVersion(Version.TRAC_0_9.name());
-
+
File file = File.createTempFile("mylar", null);
file.deleteOnExit();
-
+
TracClientManager manager = new TracClientManager(file);
ITracClient client = manager.getRepository(taskRepository);
assertNull(client.getMilestones());
@@ -67,10 +70,10 @@ public class TracClientManagerTest extends TestCase {
client.updateAttributes(new NullProgressMonitor(), false);
assertTrue(client.getMilestones().length > 0);
TracMilestone[] milestones = client.getMilestones();
-
+
manager.writeCache();
manager = new TracClientManager(file);
assertEquals(Arrays.asList(milestones), Arrays.asList(client.getMilestones()));
}
-
+
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientProxyTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientProxyTest.java
index 447025ece..de24757a8 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientProxyTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientProxyTest.java
@@ -10,27 +10,29 @@ import org.eclipse.mylyn.web.core.WebClientUtil;
public class TracClientProxyTest extends AbstractTracClientTest {
private TestProxy testProxy;
+
private Proxy proxy;
+
private int proxyPort;
-
+
public TracClientProxyTest() {
}
-
+
@Override
protected void setUp() throws Exception {
super.setUp();
-
+
testProxy = new TestProxy();
proxyPort = testProxy.startAndWait();
}
-
+
@Override
protected void tearDown() throws Exception {
super.tearDown();
-
+
testProxy.stop();
}
-
+
public void testConnectProxyWeb() throws Exception {
version = Version.TRAC_0_9;
connectProxy(TracTestConstants.TEST_TRAC_010_URL, "GET");
@@ -62,5 +64,5 @@ public class TracClientProxyTest extends AbstractTracClientTest {
assertEquals(expectedMethod, testProxy.getRequest().getMethod());
}
-
+
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracQueryTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracQueryTest.java
index 4ce3aa647..46f82c339 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracQueryTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracQueryTest.java
@@ -26,7 +26,7 @@ public class TracQueryTest extends TestCase {
String url = "http://oss.steffenpingel.de/mylar-trac-connector";
return new TracRepositoryQuery(url, url + ITracClient.QUERY_URL + parameter, "description");
}
-
+
public void testGetTracSearch() {
String queryParameter = "&order=priority&status=new&status=assigned&status=reopened&milestone=M1&owner=%7E%C3%A4%C3%B6%C3%BC";
TracRepositoryQuery query = createQuery(queryParameter);
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java
index da71dcf83..d2baf47f2 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java
@@ -215,10 +215,12 @@ public class TracRepositoryConnectorTest extends TestCase {
public void accept(RepositoryTaskData data) {
fail("Unexpected call to accept()");
}
+
@Override
public void accept(AbstractTask hit) {
result.add(hit);
- }};
+ }
+ };
IStatus queryStatus = connector.performQuery(query, repository, new NullProgressMonitor(), hitCollector);
assertTrue(queryStatus.isOK());
@@ -230,17 +232,17 @@ public class TracRepositoryConnectorTest extends TestCase {
public void testUpdateTaskDetails() throws InvalidTicketException {
init(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
-
+
TracTicket ticket = new TracTicket(123);
ticket.putBuiltinValue(Key.DESCRIPTION, "mydescription");
ticket.putBuiltinValue(Key.PRIORITY, "mypriority");
ticket.putBuiltinValue(Key.SUMMARY, "mysummary");
ticket.putBuiltinValue(Key.TYPE, "mytype");
- TracTask task = new TracTask(TracTestConstants.TEST_TRAC_010_URL, ""+123, "desc");
+ TracTask task = new TracTask(TracTestConstants.TEST_TRAC_010_URL, "" + 123, "desc");
assertEquals(TracTestConstants.TEST_TRAC_010_URL + ITracClient.TICKET_URL + "123", task.getUrl());
assertEquals("desc", task.getSummary());
-
+
connector.updateTaskFromTicket(task, ticket, false);
assertEquals(TracTestConstants.TEST_TRAC_010_URL + ITracClient.TICKET_URL + "123", task.getUrl());
assertEquals("123", task.getTaskKey());
@@ -251,11 +253,11 @@ public class TracRepositoryConnectorTest extends TestCase {
public void testUpdateTaskDetailsSummaryOnly() throws InvalidTicketException {
init(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
-
+
TracTicket ticket = new TracTicket(456);
ticket.putBuiltinValue(Key.SUMMARY, "mysummary");
- TracTask task = new TracTask(TracTestConstants.TEST_TRAC_010_URL, ""+456, "desc");
+ TracTask task = new TracTask(TracTestConstants.TEST_TRAC_010_URL, "" + 456, "desc");
connector.updateTaskFromTicket(task, ticket, false);
assertEquals(TracTestConstants.TEST_TRAC_010_URL + ITracClient.TICKET_URL + "456", task.getUrl());
@@ -307,7 +309,8 @@ public class TracRepositoryConnectorTest extends TestCase {
public void testContextXmlRpc010() throws Exception {
init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
- TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "", new NullProgressMonitor());
+ TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "",
+ new NullProgressMonitor());
TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
//int size = task.getTaskData().getAttachments().size();
@@ -317,18 +320,19 @@ public class TracRepositoryConnectorTest extends TestCase {
sourceContextFile.deleteOnExit();
assertTrue(connector.getAttachmentHandler().attachContext(repository, task, "", new NullProgressMonitor()));
-
+
TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
// TODO attachment may have been overridden therefore size may not have changed
//assertEquals(size + 1, task.getTaskData().getAttachments().size());
-
+
//RepositoryAttachment attachment = task.getTaskData().getAttachments().get(size);
//assertTrue(connector.retrieveContext(repository, task, attachment, TasksUiPlugin.getDefault().getProxySettings(), TasksUiPlugin.getDefault().getDataDirectory()));
}
public void testContextWeb096() throws Exception {
init(TracTestConstants.TEST_TRAC_096_URL, Version.TRAC_0_9);
- TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "", new NullProgressMonitor());
+ TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "",
+ new NullProgressMonitor());
File sourceContextFile = ContextCorePlugin.getContextManager().getFileForContext(task.getHandleIdentifier());
sourceContextFile.createNewFile();
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryQueryTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryQueryTest.java
index 3b22a9341..e20d31636 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryQueryTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryQueryTest.java
@@ -35,7 +35,8 @@ public class TracRepositoryQueryTest extends TestCase {
TaskRepositoryManager manager = TasksUiPlugin.getRepositoryManager();
manager.clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- TaskRepository repository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND, TracTestConstants.TEST_TRAC_096_URL);
+ TaskRepository repository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND,
+ TracTestConstants.TEST_TRAC_096_URL);
manager.addRepository(repository, TasksUiPlugin.getDefault().getRepositoriesFilePath());
TracSearch search = new TracSearch();
@@ -43,19 +44,19 @@ public class TracRepositoryQueryTest extends TestCase {
TracRepositoryQuery query = new TracRepositoryQuery(repository.getUrl(), queryUrl, "description");
TasksUiPlugin.getTaskListManager().getTaskList().addQuery(query);
- TracTask task = new TracTask(TracTestConstants.TEST_TRAC_096_URL, ""+123, "desc");
- TasksUiPlugin.getTaskListManager().getTaskList().addTask(task);
-
+ TracTask task = new TracTask(TracTestConstants.TEST_TRAC_096_URL, "" + 123, "desc");
+ TasksUiPlugin.getTaskListManager().getTaskList().addTask(task);
+
String oldUrl = repository.getUrl();
String newUrl = TracTestConstants.TEST_TRAC_010_URL;
- TasksUiPlugin.getTaskListManager().refactorRepositoryUrl(oldUrl, newUrl);
+ TasksUiPlugin.getTaskListManager().refactorRepositoryUrl(oldUrl, newUrl);
repository.setUrl(newUrl);
-
+
assertEquals(newUrl, query.getRepositoryUrl());
assertEquals(newUrl + ITracClient.QUERY_URL + search.toUrl(), query.getUrl());
assertEquals(newUrl + ITracClient.TICKET_URL + 123, task.getUrl());
}
-
+
public void testGetFilterList() {
String repositoryUrl = "https://foo.bar/repo";
String parameterUrl = "&status=new&status=assigned&status=reopened&milestone=0.1";
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositorySettingsPageTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositorySettingsPageTest.java
index f614cfe35..da124b6d1 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositorySettingsPageTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositorySettingsPageTest.java
@@ -30,7 +30,9 @@ import org.eclipse.ui.PlatformUI;
public class TracRepositorySettingsPageTest extends AbstractTracClientTest {
private TracConnectorUi connector;
+
private TracRepositorySettingsPage page;
+
private TracValidator validator;
public TracRepositorySettingsPageTest() {
@@ -57,7 +59,8 @@ public class TracRepositorySettingsPageTest extends AbstractTracClientTest {
}
@Override
- public ITracClient connect(String url, String username, String password, Proxy proxy, Version version) throws Exception {
+ public ITracClient connect(String url, String username, String password, Proxy proxy, Version version)
+ throws Exception {
page.setUrl(url);
page.setUserId(username);
page.setPassword(password);
@@ -65,7 +68,7 @@ public class TracRepositorySettingsPageTest extends AbstractTracClientTest {
validator = page.new TracValidator(page.createTaskRepository(), version);
return null;
}
-
+
public void testValidateXmlRpc() throws Exception {
version = Version.XML_RPC;
connect010();
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskDataHandlerTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskDataHandlerTest.java
index 9f2345008..f3ded9f15 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskDataHandlerTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskDataHandlerTest.java
@@ -112,7 +112,8 @@ public class TracTaskDataHandlerTest extends TestCase {
TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.offlineHandlerTicketId + "",
new NullProgressMonitor());
TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
+ RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(),
+ task.getTaskId());
int lastModified = Integer.parseInt(taskData.getLastModified());
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTestConstants.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTestConstants.java
index 643518587..db47a3df8 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTestConstants.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTestConstants.java
@@ -25,9 +25,9 @@ public class TracTestConstants {
public static final String TEST_TRAC_010_DIGEST_AUTH_URL = "http://mylyn.eclipse.org/trac010digest";
public static final String TEST_TRAC_010_FORM_AUTH_URL = "http://mylyn.eclipse.org/trac010formauth";
-
+
public static final String TEST_TRAC_011_URL = "http://mylyn.eclipse.org/trac011";
-
+
public static final String TEST_TRAC_INVALID_URL = "http://mylyn.eclipse.org/doesnotexist";
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracWebClientTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracWebClientTest.java
index d57d5f863..993a7b938 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracWebClientTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracWebClientTest.java
@@ -52,7 +52,7 @@ public class TracWebClientTest extends AbstractTracClientRepositoryTest {
public void testValidateAnonymousLogin() throws Exception {
connect(TracTestConstants.TEST_TRAC_010_URL, "", "");
repository.validate();
-
+
connect(TracTestConstants.TEST_TRAC_096_URL, "", "");
repository.validate();
}
@@ -61,7 +61,7 @@ public class TracWebClientTest extends AbstractTracClientRepositoryTest {
connect(TracTestConstants.TEST_TRAC_096_URL, "", "");
updateAttributes();
}
-
+
public void testUpdateAttributesAnonymous010() throws Exception {
connect(TracTestConstants.TEST_TRAC_010_URL, "", "");
updateAttributes();
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcClientSearchTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcClientSearchTest.java
index e6ec4e3da..37c655806 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcClientSearchTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcClientSearchTest.java
@@ -32,12 +32,12 @@ public class TracXmlRpcClientSearchTest extends AbstractTracClientSearchTest {
connect010();
searchValidateTicket();
}
-
+
public void testSearchValidateTicket011() throws Exception {
connect011();
- searchValidateTicket();
+ searchValidateTicket();
}
-
+
public void searchValidateTicket() throws Exception {
TracSearch search = new TracSearch();
search.addFilter("summary", "summary1");
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java
index 87d44eda9..7201a3688 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java
@@ -31,13 +31,12 @@ import org.eclipse.mylyn.context.tests.support.TestUtil.PrivilegeLevel;
import org.eclipse.mylyn.internal.trac.core.util.TracHttpClientTransportFactory;
/**
- * Test cases for <a href="http://trac-hacks.org/wiki/XmlRpcPlugin">Trac XML-RPC
- * Plugin</a> API. Revision 1188 or higher is required.
+ * Test cases for <a href="http://trac-hacks.org/wiki/XmlRpcPlugin">Trac XML-RPC Plugin</a> API. Revision 1188 or
+ * higher is required.
*
* <p>
- * This class does not depend on any Mylar (connector) classes except for
- * TracHttpClientTransportFactory which is needed for initialization of
- * HttpClient.
+ * This class does not depend on any Mylar (connector) classes except for TracHttpClientTransportFactory which is needed
+ * for initialization of HttpClient.
*
* @author Steffen Pingel
*/
@@ -62,7 +61,8 @@ public class TracXmlRpcTest extends TestCase {
random = new Random();
Credentials credentials = TestUtil.readCredentials(PrivilegeLevel.ADMIN);
- createConnection(new URL(TracTestConstants.TEST_TRAC_010_URL + XMLRPC_URL), credentials.username, credentials.password);
+ createConnection(new URL(TracTestConstants.TEST_TRAC_010_URL + XMLRPC_URL), credentials.username,
+ credentials.password);
tickets = new ArrayList<Integer>();
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestCleanupUtil.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestCleanupUtil.java
index a862fa7b2..fc08f092e 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestCleanupUtil.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestCleanupUtil.java
@@ -9,8 +9,8 @@ import org.eclipse.mylyn.trac.tests.AbstractTracClientTest;
import org.eclipse.mylyn.trac.tests.support.XmlRpcServer.TestData;
/**
- * Utility that cleans up artifacts created by the Trac test suite. This class
- * should be run periodically to speed up execution of (attachment) tests.
+ * Utility that cleans up artifacts created by the Trac test suite. This class should be run periodically to speed up
+ * execution of (attachment) tests.
*
* @author Steffen Pingel
*/
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestFixture.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestFixture.java
index 9b70c7988..93a6c7da3 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestFixture.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestFixture.java
@@ -17,9 +17,8 @@ import org.eclipse.mylyn.context.tests.support.TestUtil.PrivilegeLevel;
import org.eclipse.mylyn.trac.tests.TracTestConstants;
/**
- * Initializes Trac repositories to a defined state. This is done once per test
- * run, since cleaning and initializing the repository for each test method
- * would take too long.
+ * Initializes Trac repositories to a defined state. This is done once per test run, since cleaning and initializing the
+ * repository for each test method would take too long.
*
* @author Steffen Pingel
*/
@@ -28,8 +27,7 @@ public class TestFixture {
public static XmlRpcServer.TestData data010;
/**
- * Adds the existing repository content to the test data of
- * <code>server</code>.
+ * Adds the existing repository content to the test data of <code>server</code>.
*/
private static void initializeTestData(XmlRpcServer server) throws Exception {
server.ticketMilestone("milestone1").itemCreated();

Back to the top