Author: dgeraskov
Date: 2010-04-14 05:54:51 -0400 (Wed, 14 Apr 2010)
New Revision: 21457
Modified:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.test/src/org/jboss/tools/hibernate/ui/diagram/editors/model/test/OrmDiagramTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6186
Removed redundant code
Modified:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.test/src/org/jboss/tools/hibernate/ui/diagram/editors/model/test/OrmDiagramTest.java
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.test/src/org/jboss/tools/hibernate/ui/diagram/editors/model/test/OrmDiagramTest.java 2010-04-14
09:46:31 UTC (rev 21456)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.test/src/org/jboss/tools/hibernate/ui/diagram/editors/model/test/OrmDiagramTest.java 2010-04-14
09:54:51 UTC (rev 21457)
@@ -121,91 +121,5 @@
// check for all expectations
context.assertIsSatisfied();
}
-/*
- public void testSaveInXmlFile() {
-
- final ConsoleConfiguration consoleConfig = context.mock(ConsoleConfiguration.class);
- final Configuration config = context.mock(Configuration.class);
- final RootClass ioe = context.mock(RootClass.class);
- ArrayList<RootClass> rts = new ArrayList<RootClass>();
- final Property id = new Property();
- Value v = new SimpleValue();
- id.setValue(v);
- id.setName("id");
- id.setPersistentClass(ioe);
- rts.add(ioe);
- final List<Object> emptyList = new ArrayList<Object>();
- final Iterator<Object> emptyListIterator = emptyList.iterator();
- final String innerInnerClass = "myInner$Id";
- context.checking(new Expectations() {
- {
- oneOf(ioe).getEntityName();
- will(returnValue(innerInnerClass)); //$NON-NLS-1$
-
- allowing(consoleConfig).getConfiguration();
- will(returnValue(config));
-
- oneOf(ioe).getEntityName();
- will(returnValue(innerInnerClass)); //$NON-NLS-1$
-
- oneOf(ioe).getEntityName();
- will(returnValue(innerInnerClass)); //$NON-NLS-1$
-
- oneOf(ioe).getIdentifierProperty();
- will(returnValue(id));
-
- oneOf(ioe).getIdentifier();
- will(returnValue(null));
-
- oneOf(ioe).getPropertyIterator();
- will(returnValue(emptyListIterator));
-
- oneOf(ioe).getTable();
- will(returnValue(null));
-
- oneOf(ioe).getSubclassIterator();
- will(returnValue(emptyListIterator));
-
- oneOf(ioe).getIdentifier();
- will(returnValue(null));
-
- oneOf(ioe).getJoinIterator();
- will(returnValue(emptyListIterator));
-
- allowing(ioe).getNodeName();
- will(returnValue("NodeName")); //$NON-NLS-1$
-
- allowing(ioe).getClassName();
- will(returnValue("ClassName")); //$NON-NLS-1$
-
- allowing(consoleConfig).getName();
- will(returnValue("CCName")); //$NON-NLS-1$
-
- allowing(ioe).getEntityName();
- will(returnValue(innerInnerClass)); //$NON-NLS-1$
- }
- });
- final OrmDiagram ormDiagram = new OrmDiagram("", rts) { //$NON-NLS-1$
- public ConsoleConfiguration getConsoleConfig() {
- return consoleConfig;
- }
- };
- ormDiagram.saveInXmlFile();
- // test is the folder created
- File folder = new File(ormDiagram.getStoreFolderPath().toOSString());
- assertTrue(folder.exists() && folder.isDirectory());
- // test is the file created
- File file = new File(ormDiagram.getStoreFilePath().toOSString());
- assertTrue(file.exists() && file.isFile());
- //
- boolean res = file.delete();
- assertTrue(res);
- //
- res = folder.delete();
- assertTrue(res);
- // GENERAL TEST:
- // check for all expectations
- context.assertIsSatisfied();
- }*/
}