diff options
Diffstat (limited to 'org.eclipse.ua.tests/help/org')
8 files changed, 21 insertions, 7 deletions
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/ParseCriteriaDefinition.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/ParseCriteriaDefinition.java index 392f795fc..c38c891cf 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/ParseCriteriaDefinition.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/ParseCriteriaDefinition.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010 IBM Corporation and others. + * Copyright (c) 2010, 2011 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 @@ -43,6 +43,7 @@ public class ParseCriteriaDefinition extends TestCase { CriteriaDefinitionContribution result_a_b = parser.parse(new CriteriaDefinitionFile(UserAssistanceTestPlugin.getPluginId(), "data/help/criteria/criteria_definition/result_a_b.xml", "en")); CriteriaDefinitionAssembler assembler = new CriteriaDefinitionAssembler(); + @SuppressWarnings("unchecked") List contributions = new ArrayList(Arrays.asList(new Object[] { a, b })); CriteriaDefinition assembled = assembler.assemble(contributions); diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/index/IndexAssemblerTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/index/IndexAssemblerTest.java index 3d612902c..d2760d799 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/index/IndexAssemblerTest.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/index/IndexAssemblerTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2009 IBM Corporation and others. + * Copyright (c) 2006, 2011 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 @@ -53,6 +53,7 @@ public class IndexAssemblerTest extends TestCase { IndexContribution result_a_b_c = parser.parse(new IndexFile(UserAssistanceTestPlugin.getPluginId(), "data/help/index/assembler/result_a_b_c.xml", "en")); IndexAssembler assembler = new IndexAssembler(); + @SuppressWarnings("unchecked") List contributions = new ArrayList(Arrays.asList(new Object[] { a, b, c })); Index assembled = assembler.assemble(contributions, Platform.getNL()); @@ -65,6 +66,7 @@ public class IndexAssemblerTest extends TestCase { IndexFileParser parser = new IndexFileParser(); IndexContribution contrib = parser.parse(new IndexFile(UserAssistanceTestPlugin.getPluginId(), "data/help/index/assembler/d.xml", "en")); IndexAssembler assembler = new IndexAssembler(); + @SuppressWarnings("unchecked") List contributions = new ArrayList(Arrays.asList(new Object[] { contrib })); Index index = assembler.assemble(contributions, Platform.getNL()); IIndexEntry[] children = (IIndexEntry[]) index.getEntries(); @@ -92,6 +94,7 @@ public class IndexAssemblerTest extends TestCase { IndexFileParser parser = new IndexFileParser(); IndexContribution contrib = parser.parse(new IndexFile(UserAssistanceTestPlugin.getPluginId(), "data/help/index/assembler/hasTitle.xml", "en")); IndexAssembler assembler = new IndexAssembler(); + @SuppressWarnings("unchecked") List contributions = new ArrayList(Arrays.asList(new Object[] { contrib })); Index index = assembler.assemble(contributions, Platform.getNL()); IIndexEntry[] children = index.getEntries(); diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/IndexAssemblePerformanceTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/IndexAssemblePerformanceTest.java index 75d5c8955..e5701f92a 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/IndexAssemblePerformanceTest.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/IndexAssemblePerformanceTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 IBM Corporation and others. + * Copyright (c) 2008, 2011 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 @@ -72,6 +72,7 @@ public class IndexAssemblePerformanceTest extends PerformanceTestCase { IndexContribution b = parser.parse(new IndexFile(UserAssistanceTestPlugin.getPluginId(), "data/help/performance/index/index2.xml", "en")); IndexContribution c = parser.parse(new IndexFile(UserAssistanceTestPlugin.getPluginId(), "data/help/performance/index/index3.xml", "en")); IndexAssembler assembler = new IndexAssembler(); + @SuppressWarnings("unchecked") List contributions = new ArrayList(Arrays.asList(new Object[] { a, b, c })); Index assembled = assembler.assemble(contributions, Platform.getNL()); assertEquals(100, assembled.getChildren().length); diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/TocAssemblePerformanceTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/TocAssemblePerformanceTest.java index 4f0eb5d0f..c125887de 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/TocAssemblePerformanceTest.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/TocAssemblePerformanceTest.java @@ -48,6 +48,7 @@ public class TocAssemblePerformanceTest extends PerformanceTestCase { return parser.parse(new TocFile(UserAssistanceTestPlugin.getPluginId(), tocFile, true, "en", null, null)); } + @SuppressWarnings("unchecked") public void assembleToc() throws Exception { TocFileParser parser = new TocFileParser(); List<TocContribution> contributions = new ArrayList<TocContribution>(); diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/HelpDataTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/HelpDataTest.java index 677040b67..2ecc5acaa 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/HelpDataTest.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/HelpDataTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2009 IBM Corporation and others. + * Copyright (c) 2006, 2011 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 @@ -92,7 +92,9 @@ public class HelpDataTest extends TestCase { String[][] entry = (String[][])TEST_DATA[i]; String file = entry[0][0]; List expectedTocOrder = Arrays.asList(entry[1]); + @SuppressWarnings("unchecked") Set expectedHiddenTocs = new HashSet(Arrays.asList(entry[2])); + @SuppressWarnings("unchecked") Set expectedHiddenIndexes = new HashSet(Arrays.asList(entry[3])); URL url = UserAssistanceTestPlugin.getDefault().getBundle().getEntry(file); HelpData data = new HelpData(url); diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/ProductPreferencesTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/ProductPreferencesTest.java index 0a85acb04..28e714a3b 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/ProductPreferencesTest.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/ProductPreferencesTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2007 IBM Corporation and others. + * Copyright (c) 2006, 2011 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 @@ -182,6 +182,7 @@ public class ProductPreferencesTest extends TestCase { for (int i=0;i<GET_VALUE_DATA.length;++i) { String[] data = GET_VALUE_DATA[i]; String key = data[0]; + @SuppressWarnings("unchecked") Set allowableValues = new HashSet(ProductPreferences.tokenize(data[1])); Properties primary = ProductPreferences.loadPropertiesFile(UserAssistanceTestPlugin.getDefault().getBundle().getSymbolicName(), "data/help/preferences/" + data[2]); Properties[] secondary = new Properties[data.length - 3]; diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocAssemblerTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocAssemblerTest.java index bf63ff642..21e4d4d82 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocAssemblerTest.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocAssemblerTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2010 IBM Corporation and others. + * Copyright (c) 2006, 2011 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 @@ -37,6 +37,7 @@ public class TocAssemblerTest extends TestCase { return new TestSuite(TocAssemblerTest.class); } + @SuppressWarnings("unchecked") public void testAssemble() throws Exception { TocFileParser parser = new TocFileParser(); TocContribution b = parser.parse(new TocFile(UserAssistanceTestPlugin.getPluginId(), "data/help/toc/assembler/b.xml", true, "en", null, null)); @@ -73,6 +74,7 @@ public class TocAssemblerTest extends TestCase { TocContribution linkTo3 = parser.parse(new TocFile(UserAssistanceTestPlugin.getPluginId(), "data/help/toc/assembler/linkTo3.xml", true, "en", null, null)); TocAssembler assembler = new TocAssembler(); + @SuppressWarnings("unchecked") List contributions = new ArrayList(Arrays.asList(new Object[] { linkTo1, linkTo2, linkTo3 })); contributions = assembler.assemble(contributions); assertEquals(3, contributions.size()); @@ -83,6 +85,7 @@ public class TocAssemblerTest extends TestCase { TocContribution b = parser.parse(new TocFile(UserAssistanceTestPlugin.getPluginId(), "data/help/toc/assembler/b.xml", true, "en", null, null)); TocContribution c = parser.parse(new TocFile(UserAssistanceTestPlugin.getPluginId(), "data/help/toc/assembler/c.xml", true, "en", null, null)); TocAssembler assembler = new TocAssembler(); + @SuppressWarnings("unchecked") List contributions = new ArrayList(Arrays.asList(new Object[] { b, c })); contributions = assembler.assemble(contributions); IToc toc =((TocContribution)contributions.get(0)).getToc(); diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/LocaleTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/LocaleTest.java index 53a02fac6..ca01603e0 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/LocaleTest.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/LocaleTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 IBM Corporation and others. + * Copyright (c) 2008, 2011 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 @@ -45,6 +45,7 @@ public class LocaleTest extends TestCase { assertEquals("ab-cd______ef", UrlUtil.cleanLocale("ab-cd\n\r_\"\'_ef")); } + @SuppressWarnings("unchecked") public void testForced_Locale() { BaseHelpSystem.setMode(BaseHelpSystem.MODE_INFOCENTER); MockServletRequest req = new MockServletRequest(); @@ -54,6 +55,7 @@ public class LocaleTest extends TestCase { assertEquals("es", locale); } + @SuppressWarnings("unchecked") public void testForcedLangOverridesCookies() { BaseHelpSystem.setMode(BaseHelpSystem.MODE_INFOCENTER); MockServletRequest req = new MockServletRequest(); |