Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaAttributeTest.java')
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaAttributeTest.java95
1 files changed, 47 insertions, 48 deletions
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaAttributeTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaAttributeTest.java
index 5fb813d49..f0aed2585 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaAttributeTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaAttributeTest.java
@@ -1,49 +1,48 @@
-/*******************************************************************************
- * Copyright (c) 2013 Frank Becker and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse @Test
- public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Frank Becker - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests.core;
-
-import junit.framework.TestCase;
-
-import org.apache.commons.io.IOUtils;
-import org.eclipse.mylyn.bugzilla.tests.support.BugzillaFixture;
-import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttributeMapper;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-
-/**
- * @author Steffen Pingel
- */
-public class BugzillaAttributeTest extends TestCase {
-
- public void testTaskDataSchema() throws Exception {
- BugzillaRepositoryConnector connector = BugzillaFixture.current().connector();
- TaskRepository repository = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND, "http://repository");
- BugzillaAttributeMapper mapper = new BugzillaAttributeMapper(repository, connector);
- TaskData taskData = new TaskData(mapper, repository.getConnectorKind(), repository.getRepositoryUrl(), "");
- BugzillaAttribute[] attributes = BugzillaAttribute.values();
- for (BugzillaAttribute attribute : attributes) {
- TaskAttribute taskDataAttribute = taskData.getRoot().createAttribute(attribute.getKey());
- taskDataAttribute.getMetaData().setReadOnly(attribute.isReadOnly());
- taskDataAttribute.getMetaData().setKind(attribute.getKind());
- taskDataAttribute.getMetaData().setType(attribute.getType());
- }
- assertEquals(IOUtils.toString(CommonTestUtil.getResource(this, "testdata/schema/taskdata.txt")),
- taskData.getRoot().toString());
- }
-
+/*******************************************************************************
+ * Copyright (c) 2013 Frank Becker and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse @Test
+ public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Frank Becker - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.bugzilla.tests.core;
+
+import org.apache.commons.io.IOUtils;
+import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil;
+import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
+import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttributeMapper;
+import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
+import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector;
+import org.eclipse.mylyn.tasks.core.TaskRepository;
+import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
+import org.eclipse.mylyn.tasks.core.data.TaskData;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Steffen Pingel
+ */
+public class BugzillaAttributeTest extends TestCase {
+
+ public void testTaskDataSchema() throws Exception {
+ BugzillaRepositoryConnector connector = new BugzillaRepositoryConnector();
+ TaskRepository repository = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND, "http://repository");
+ BugzillaAttributeMapper mapper = new BugzillaAttributeMapper(repository, connector);
+ TaskData taskData = new TaskData(mapper, repository.getConnectorKind(), repository.getRepositoryUrl(), "");
+ BugzillaAttribute[] attributes = BugzillaAttribute.values();
+ for (BugzillaAttribute attribute : attributes) {
+ TaskAttribute taskDataAttribute = taskData.getRoot().createAttribute(attribute.getKey());
+ taskDataAttribute.getMetaData().setReadOnly(attribute.isReadOnly());
+ taskDataAttribute.getMetaData().setKind(attribute.getKind());
+ taskDataAttribute.getMetaData().setType(attribute.getType());
+ }
+ assertEquals(IOUtils.toString(CommonTestUtil.getResource(this, "testdata/schema/taskdata.txt")),
+ taskData.getRoot().toString());
+ }
+
} \ No newline at end of file

Back to the top