Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2009-06-10 22:45:28 +0000
committerrelves2009-06-10 22:45:28 +0000
commit30ee4c9568f1b0ae2d4a3f1b20ee7aaa590769e2 (patch)
treefbae125501f896ac0072a9ba93dd08a15d8022db /org.eclipse.mylyn.bugzilla.tests
parent0dc7d2d394c109abee6db86457c7669c898d731c (diff)
downloadorg.eclipse.mylyn.tasks-30ee4c9568f1b0ae2d4a3f1b20ee7aaa590769e2.tar.gz
org.eclipse.mylyn.tasks-30ee4c9568f1b0ae2d4a3f1b20ee7aaa590769e2.tar.xz
org.eclipse.mylyn.tasks-30ee4c9568f1b0ae2d4a3f1b20ee7aaa590769e2.zip
RESOLVED - bug 218400: [patch] Display formatted timestamps adjusted to local time
https://bugs.eclipse.org/bugs/show_bug.cgi?id=218400
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.tests')
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AbstractBugzillaTest.java6
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.java9
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java5
3 files changed, 14 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AbstractBugzillaTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AbstractBugzillaTest.java
index 553f947f2..48d9d255e 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AbstractBugzillaTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AbstractBugzillaTest.java
@@ -133,6 +133,12 @@ public abstract class AbstractBugzillaTest extends TestCase {
assertEquals(abstractRepositoryClient.getConnectorKind(), DEFAULT_KIND);
connector = (BugzillaRepositoryConnector) abstractRepositoryClient;
+ try {
+ BugzillaCorePlugin.getRepositoryConfiguration(repository, false, new NullProgressMonitor());
+ } catch (CoreException e) {
+ e.printStackTrace();
+ fail();
+ }
}
protected ITask generateLocalTaskAndDownload(String taskNumber) throws CoreException {
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.java
index 3a8574ff9..97baa57c8 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.java
@@ -14,14 +14,15 @@ package org.eclipse.mylyn.bugzilla.tests;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
+import java.io.IOException;
import java.io.InputStreamReader;
-import java.net.MalformedURLException;
import java.net.URL;
import junit.framework.TestCase;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
import org.eclipse.mylyn.commons.net.AuthenticationType;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient;
@@ -54,7 +55,7 @@ public class BugzillaConfigurationTest extends TestCase {
}
private BugzillaClient createClient(String hostUrl, String username, String password, String htAuthUser,
- String htAuthPass, String encoding) throws MalformedURLException, CoreException {
+ String htAuthPass, String encoding) throws CoreException, IOException {
TaskRepository taskRepository = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND, hostUrl);
AuthenticationCredentials credentials = new AuthenticationCredentials(username, password);
@@ -63,7 +64,9 @@ public class BugzillaConfigurationTest extends TestCase {
AuthenticationCredentials webCredentials = new AuthenticationCredentials(htAuthUser, htAuthPass);
taskRepository.setCredentials(AuthenticationType.HTTP, webCredentials, false);
taskRepository.setCharacterEncoding(encoding);
- return bugzillaClientManager.getClient(taskRepository, null);
+ BugzillaClient client = bugzillaClientManager.getClient(taskRepository, null);
+ client.getRepositoryConfiguration(new NullProgressMonitor());
+ return client;
}
public void test222RDFProductConfig() throws Exception {
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java
index 4c646cd80..33acc53fb 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java
@@ -136,7 +136,6 @@ public class RepositoryReportFactoryTest extends TestCase {
String bugid = "2";
setRepository(BugzillaCorePlugin.CONNECTOR_KIND, IBugzillaTestConstants.TEST_BUGZILLA_222_URL);
TaskData report = init(bugid);
-
assertNotNull(report);
assertEquals("search-match-test 1", report.getRoot()
.getAttribute(BugzillaAttribute.SHORT_DESC.getKey())
@@ -170,8 +169,8 @@ public class RepositoryReportFactoryTest extends TestCase {
TaskCommentMapper commentMap = TaskCommentMapper.createFrom(comments.get(0));
assertEquals("relves@cs.ubc.ca", commentMap.getAuthor().getPersonId());
assertEquals("browser comment", commentMap.getText());
- SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
- assertEquals(format.parse("2006-05-30 18:56"), commentMap.getCreationDate());
+ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ assertEquals(format.parse("2006-05-30 18:56:24"), commentMap.getCreationDate());
}
public void testReadingReport2201() throws Exception {

Back to the top