Author: max.andersen(a)jboss.com
Date: 2008-01-17 04:22:05 -0500 (Thu, 17 Jan 2008)
New Revision: 5754
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingDiagramTest.java
Removed:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingDiagrammTest.java
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/TestSet.java
Log:
typo fixing
Copied:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingDiagramTest.java
(from rev 5753,
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingDiagrammTest.java)
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingDiagramTest.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingDiagramTest.java 2008-01-17
09:22:05 UTC (rev 5754)
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.hibernate.eclipse.console.test.mappingproject;
+
+import junit.framework.TestCase;
+
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+import org.hibernate.InvalidMappingException;
+import org.hibernate.MappingException;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.console.ConsoleConfiguration;
+import org.hibernate.console.KnownConfigurations;
+import org.hibernate.eclipse.console.workbench.ConfigurationWorkbenchAdapter;
+import org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter;
+import org.hibernate.mapping.PersistentClass;
+import org.jboss.tools.hibernate.ui.view.views.OpenDiagramActionDelegate;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class OpenMappingDiagramTest extends TestCase {
+ public void testOpenMappingDiagram() {
+ KnownConfigurations knownConfigurations = KnownConfigurations.getInstance();
+ final ConsoleConfiguration consCFG =
knownConfigurations.find(ProjectUtil.ConsoleCFGName);
+ assertNotNull(consCFG);
+ consCFG.reset();
+ Object[] configs = null;
+ Object[] persClasses = null;
+ try {
+ configs = new ConsoleConfigurationWorkbenchAdapter().getChildren(consCFG);
+ assertTrue(configs[0] instanceof Configuration);
+ persClasses = new ConfigurationWorkbenchAdapter().getChildren(configs[0]);
+ } catch (InvalidMappingException ex){
+ fail("Mapping Diagramms for package " +
HibernateAllMappingTests.getActivePackage().getElementName()
+ + " can't be opened:\n " + ex.getMessage());
+ }
+
+ if (persClasses.length > 0){
+ for (int i = 0; i < persClasses.length; i++) {
+ assertTrue(persClasses[0] instanceof PersistentClass);
+ PersistentClass persClass = (PersistentClass) persClasses[i];
+
+ IEditorPart editor = null;
+ Throwable ex = null;
+ try {
+ editor = new OpenDiagramActionDelegate().openEditor(persClass, consCFG);
+ } catch (PartInitException e) {
+ ex = e;
+ }
+ if (ex == null ) ex = ProjectUtil.getExceptionIfItOccured(editor);
+ if (ex != null) fail("Mapping Diagramm for " + persClass.getClassName()
+ + " not opened:\n" + ex.getMessage());
+ }
+ }
+ //close all editors
+ }
+
+
+}
Deleted:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingDiagrammTest.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingDiagrammTest.java 2008-01-17
01:21:02 UTC (rev 5753)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingDiagrammTest.java 2008-01-17
09:22:05 UTC (rev 5754)
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.hibernate.eclipse.console.test.mappingproject;
-
-import junit.framework.TestCase;
-
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PartInitException;
-import org.hibernate.InvalidMappingException;
-import org.hibernate.MappingException;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.console.ConsoleConfiguration;
-import org.hibernate.console.KnownConfigurations;
-import org.hibernate.eclipse.console.workbench.ConfigurationWorkbenchAdapter;
-import org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter;
-import org.hibernate.mapping.PersistentClass;
-import org.jboss.tools.hibernate.ui.view.views.OpenDiagramActionDelegate;
-
-/**
- * @author Dmitry Geraskov
- *
- */
-public class OpenMappingDiagrammTest extends TestCase {
- public void testOpenMappingDiagramm() {
- KnownConfigurations knownConfigurations = KnownConfigurations.getInstance();
- final ConsoleConfiguration consCFG =
knownConfigurations.find(ProjectUtil.ConsoleCFGName);
- assertNotNull(consCFG);
- consCFG.reset();
- Object[] configs = null;
- Object[] persClasses = null;
- try {
- configs = new ConsoleConfigurationWorkbenchAdapter().getChildren(consCFG);
- assertTrue(configs[0] instanceof Configuration);
- persClasses = new ConfigurationWorkbenchAdapter().getChildren(configs[0]);
- } catch (InvalidMappingException ex){
- fail("Mapping Diagramms for package " +
HibernateAllMappingTests.getActivePackage().getElementName()
- + " can't be opened:\n " + ex.getMessage());
- }
-
- if (persClasses.length > 0){
- for (int i = 0; i < persClasses.length; i++) {
- assertTrue(persClasses[0] instanceof PersistentClass);
- PersistentClass persClass = (PersistentClass) persClasses[i];
-
- IEditorPart editor = null;
- Throwable ex = null;
- try {
- editor = new OpenDiagramActionDelegate().openEditor(persClass, consCFG);
- } catch (PartInitException e) {
- ex = e;
- }
- if (ex == null ) ex = ProjectUtil.getExceptionIfItOccured(editor);
- if (ex != null) fail("Mapping Diagramm for " + persClass.getClassName()
- + " not opened:\n" + ex.getMessage());
- }
- }
- //close all editors
- }
-
-
-}
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/TestSet.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/TestSet.java 2008-01-17
01:21:02 UTC (rev 5753)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/TestSet.java 2008-01-17
09:22:05 UTC (rev 5754)
@@ -40,7 +40,7 @@
private static void addPackTests(TestSuite suite){
suite.addTestSuite( OpenSourceFileTest.class );
suite.addTestSuite( OpenMappingFileTest.class );
- suite.addTestSuite( OpenMappingDiagrammTest.class );
+ suite.addTestSuite( OpenMappingDiagramTest.class );
}
private static void addTestsPackTearDown(TestSuite suite){