added new prefs test
authortimkelly
Mon, 11 Oct 2010 14:28:36 -0500
changeset 2149 97f77163e6d0
parent 2148 66c78e934460
child 2150 64e9abb9ebeb
added new prefs test
builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/TestCreateGlobalPrefs.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/TestCreateGlobalPrefs.java	Mon Oct 11 14:28:36 2010 -0500
@@ -0,0 +1,67 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Test the BldInfViewPathHelper class.
+*
+*/
+package com.nokia.carbide.cdt.builder.test;
+
+import org.eclipse.ui.dialogs.PreferencesUtil;
+
+import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils;
+
+/**
+ * Test class to simply load all the global Carbide preferences
+ *
+ */
+public class TestCreateGlobalPrefs extends BaseTest {
+	
+	private static final String[] carbidePrefIds = { "com.nokia.carbide.cpp.sdk.ui.preferences.BuildPlatformFilterPage",
+		"com.nokia.carbide.cpp.internal.sdk.ui.SDKPreferencePage",
+		"com.nokia.carbide.cpp.internal.sdk.ui.SDKPreferencePage",
+		"com.nokia.carbide.cdt.internal.builder.ui.BuilderPreferencePage",
+		"com.nokia.carbide.cpp.preferences.ExtensionsPreferencesPage",
+		"com.nokia.carbide.cpp.internal.builder.utils.ui.PreprocessPreferencePage",
+		"com.nokia.carbide.cpp.internal.project.ui.preferences.CarbidePreferencePage",
+		"com.nokia.carbide.cdt.internal.builder.ui.BuilderPreferencePage"
+	};
+	
+	@Override
+	protected void setUp() throws Exception {
+		
+	}
+	
+	@Override
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+	
+	
+	/**
+	 * Iterte all the global eclipse pref IDs for Carbide prefs
+	 * and try to create them. Any exception will require teasing
+	 * the stack frame to find the offending preference that could not be loaded.
+	 * @throws Exception
+	 */
+	public void testCreatePrefs() throws Exception {
+		
+		for (String id : carbidePrefIds){
+			PreferencesUtil.createPreferenceDialogOn(WorkbenchUtils.getSafeShell(), id, null, null, 0);
+		}
+		
+		// Deprecated - to be filtered
+		//com.nokia.cdt.debug.cw.symbian.ui.GlobalSettings
+		//com.nokia.carbide.cpp.logging.LoggingPreferencesPage
+	}
+}