Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite')
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestCheatSheetManagerEvents.java3
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestCompositeParser.java5
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestPersistence.java8
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestState.java1
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestTaskEvents.java2
5 files changed, 13 insertions, 6 deletions
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestCheatSheetManagerEvents.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestCheatSheetManagerEvents.java
index 4103e88bb..1753b182b 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestCheatSheetManagerEvents.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestCheatSheetManagerEvents.java
@@ -26,17 +26,20 @@ public class TestCheatSheetManagerEvents extends TestCase {
private int handler2Calls;
private class Handler1 extends CheatSheetListener {
+ @Override
public void cheatSheetEvent(ICheatSheetEvent event) {
handler1Calls++;
}
}
private class Handler2 extends CheatSheetListener {
+ @Override
public void cheatSheetEvent(ICheatSheetEvent event) {
handler2Calls++;
}
}
+ @Override
protected void setUp() throws Exception {
element = new CheatSheetElement("Name");
manager = new CheatSheetManager(element);
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestCompositeParser.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestCompositeParser.java
index eb29d7b4c..6e35cb4b5 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestCompositeParser.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestCompositeParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2015 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -31,6 +31,7 @@ public class TestCompositeParser extends TestCase {
private static final String COMPOSITES_FOLDER = "data/cheatsheet/composite/";
private CompositeCheatSheetParser parser;
+ @Override
protected void setUp() throws Exception {
parser = new CompositeCheatSheetParser();
}
@@ -99,7 +100,7 @@ public class TestCompositeParser extends TestCase {
CompositeCheatSheetModel model = parseTestFile("ValidParameter.xml");
assertNotNull(model);
assertTrue(parser.getStatus().isOK());
- Dictionary params = model.getRootTask().getParameters();
+ Dictionary<String, String> params = model.getRootTask().getParameters();
assertEquals(1, params.size());
assertEquals("b", params.get("a"));
}
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestPersistence.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestPersistence.java
index 21e1e1f98..c0f842d78 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestPersistence.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestPersistence.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 IBM Corporation and others.
+ * Copyright (c) 2006, 2015 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -95,7 +95,7 @@ public class TestPersistence extends TestCase {
helper.saveCompositeState(model, null);
createCompositeCheatSheet();
- model.loadState(new Hashtable());
+ model.loadState(new Hashtable<String, String>());
assertEquals(ICompositeCheatSheetTask.IN_PROGRESS, task1.getState());
assertEquals(ICompositeCheatSheetTask.COMPLETED, task2.getState());
}
@@ -124,7 +124,7 @@ public class TestPersistence extends TestCase {
helper.saveCompositeState(model, null);
createCompositeCheatSheet();
- model.loadState(new Hashtable());
+ model.loadState(new Hashtable<String, String>());
editor1.setInput(task1, model.getTaskMemento(task1.getId()));
editor2.setInput(task2, model.getTaskMemento(task2.getId()));
assertEquals(value1, editor1.getValue());
@@ -140,7 +140,7 @@ public class TestPersistence extends TestCase {
values.put("One", "1");
values.put("Two", "2");
helper.saveCompositeState(model, values);
- Map restoredValues = new Hashtable();
+ Map<String, String> restoredValues = new Hashtable<String, String>();
createCompositeCheatSheet();
model.loadState(restoredValues);
assertEquals(2, restoredValues.size());
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestState.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestState.java
index 99bdcf5da..f29225236 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestState.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestState.java
@@ -29,6 +29,7 @@ public class TestState extends TestCase {
private CompositeCheatSheetModel model;
+ @Override
protected void setUp() throws Exception {
model = new CompositeCheatSheetModel("name", "description", "explorerId");
}
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestTaskEvents.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestTaskEvents.java
index 7b2a19e2a..6b645d9d6 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestTaskEvents.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestTaskEvents.java
@@ -76,6 +76,7 @@ public class TestTaskEvents extends TestCase {
}
public class ModelObserver implements Observer {
+ @Override
public void update(Observable o, Object arg) {
taskMap.put((ICompositeCheatSheetTask)arg);
}
@@ -123,6 +124,7 @@ public class TestTaskEvents extends TestCase {
group2.addSubtask(task2B);
}
+ @Override
protected void setUp() throws Exception {
resetTaskMap();
}

Back to the top