test_class.declarator: classUnderTest
test_class.modifier: private
test_class.original_string: private AbstractSideBySideDiffPresentation classUnderTest;
test_class.type: AbstractSideBySideDiffPresentation
test_class.var_name: classUnderTest
test_class.declarator: mockIoUtilities
test_class.modifier: @Mock
  	private
test_class.original_string: @Mock
  	private IOUtilities mockIoUtilities;
test_class.type: IOUtilities
test_class.var_name: mockIoUtilities
test_class.declarator: mockFileWrapperFactory
test_class.modifier: @Mock
  	private
test_class.original_string: @Mock
  	private FileWrapperFactory mockFileWrapperFactory;
test_class.type: FileWrapperFactory
test_class.var_name: mockFileWrapperFactory
test_class.declarator: mockSessionInfoProvider
test_class.modifier: @Mock
  	private
test_class.original_string: @Mock
  	private SessionInfoProvider mockSessionInfoProvider;
test_class.type: SessionInfoProvider
test_class.var_name: mockSessionInfoProvider
test_class.declarator: mockDialectFactory
test_class.modifier: @Mock
  	private
test_class.original_string: @Mock
  	private IDialectFactory mockDialectFactory;
test_class.type: IDialectFactory
test_class.var_name: mockDialectFactory
test_class.declarator: mockSourceSession
test_class.modifier: @Mock
  	private
test_class.original_string: @Mock
  	private ISession mockSourceSession;
test_class.type: ISession
test_class.var_name: mockSourceSession
test_class.declarator: mockDestSession
test_class.modifier: @Mock
  	private
test_class.original_string: @Mock
  	private ISession mockDestSession;
test_class.type: ISession
test_class.var_name: mockDestSession
test_class.declarator: mockHibernateDialect
test_class.modifier: @Mock
  	private
test_class.original_string: @Mock
  	private HibernateDialect mockHibernateDialect;
test_class.type: HibernateDialect
test_class.var_name: mockHibernateDialect
test_class.declarator: mockSourceDatabaseMetaData
test_class.modifier: @Mock
  	private
test_class.original_string: @Mock
  	private ISQLDatabaseMetaData mockSourceDatabaseMetaData;
test_class.type: ISQLDatabaseMetaData
test_class.var_name: mockSourceDatabaseMetaData
test_class.declarator: mockDestDatabaseMetaData
test_class.modifier: @Mock
  	private
test_class.original_string: @Mock
  	private ISQLDatabaseMetaData mockDestDatabaseMetaData;
test_class.type: ISQLDatabaseMetaData
test_class.var_name: mockDestDatabaseMetaData
test_class.declarator: mockScriptFileManager
test_class.modifier: @Mock
  	private
test_class.original_string: @Mock
  	private IScriptFileManager mockScriptFileManager;
test_class.type: IScriptFileManager
test_class.var_name: mockScriptFileManager
test_class.declarator: testTableInfo1
test_class.modifier: private
test_class.original_string: private ITableInfo testTableInfo1;
test_class.type: ITableInfo
test_class.var_name: testTableInfo1
test_class.declarator: testTableInfo2
test_class.modifier: private
test_class.original_string: private ITableInfo testTableInfo2;
test_class.type: ITableInfo
test_class.var_name: testTableInfo2
test_class.declarator: mockSourceSelectedObjects = null
test_class.modifier: private
test_class.original_string: private IDatabaseObjectInfo[] mockSourceSelectedObjects = null;
test_class.type: IDatabaseObjectInfo[]
test_class.var_name: mockSourceSelectedObjects
test_class.declarator: mockDestSelectedObjects = null
test_class.modifier: private
test_class.original_string: private IDatabaseObjectInfo[] mockDestSelectedObjects = null;
test_class.type: IDatabaseObjectInfo[]
test_class.var_name: mockDestSelectedObjects
test_class.file: sql12/plugins/dbdiff/src/test/java/net/sourceforge/squirrel_sql/plugins/dbdiff/gui/AbstractSideBySideDiffPresentationTest.java
test_class.identifier: AbstractSideBySideDiffPresentationTest
test_case.body: @Test
  	@SuppressWarnings("unchecked")
  	public void testExecute() throws SQLException
  	{
  		classUnderTest.setFileWrapperFactory(mockFileWrapperFactory);
  		classUnderTest.setIoutils(mockIoUtilities);
  		classUnderTest.setSessionInfoProvider(mockSessionInfoProvider);
  		classUnderTest.setDialectFactory(mockDialectFactory);
  
  		when(mockSessionInfoProvider.getSourceSession()).thenReturn(mockSourceSession);
  		when(mockSessionInfoProvider.getDestSession()).thenReturn(mockDestSession);
  		when(mockSessionInfoProvider.getSourceSelectedDatabaseObjects()).thenReturn(mockSourceSelectedObjects);
  		when(mockSessionInfoProvider.getDestSelectedDatabaseObjects()).thenReturn(mockDestSelectedObjects);
  		when(mockSessionInfoProvider.getScriptFileManager()).thenReturn(mockScriptFileManager);
  
  		when(mockSourceSession.getMetaData()).thenReturn(mockSourceDatabaseMetaData);
  		when(mockDestSession.getMetaData()).thenReturn(mockDestDatabaseMetaData);
  
  		when(mockDialectFactory.getDialect(mockSourceDatabaseMetaData)).thenReturn(mockHibernateDialect);
  		when(mockDialectFactory.getDialect(mockDestDatabaseMetaData)).thenReturn(mockHibernateDialect);
  
  		final List<String> createScript = new ArrayList<String>();
  		createScript.add("create table test ( myid integere, mydesc varchar(100));");
  
  		when(
  			mockHibernateDialect.getCreateTableSQL(anyList(), eq(mockSourceDatabaseMetaData),
  				(CreateScriptPreferences) any(), eq(false))).thenReturn(createScript);
  
  		when(
  			mockHibernateDialect.getCreateTableSQL(anyList(), eq(mockDestDatabaseMetaData),
  				(CreateScriptPreferences) any(), eq(false))).thenReturn(createScript);
  
  		classUnderTest.execute();
  	}
test_case.class_method_signature: AbstractSideBySideDiffPresentationTest.testExecute()
test_case.full_signature: @Test @SuppressWarnings("unchecked") public void testExecute()
test_case.identifier: testExecute
test_case.invocations: setFileWrapperFactory setIoutils setSessionInfoProvider setDialectFactory thenReturn when getSourceSession thenReturn when getDestSession thenReturn when getSourceSelectedDatabaseObjects thenReturn when getDestSelectedDatabaseObjects thenReturn when getScriptFileManager thenReturn when getMetaData thenReturn when getMetaData thenReturn when getDialect thenReturn when getDialect add thenReturn when getCreateTableSQL anyList eq any eq thenReturn when getCreateTableSQL anyList eq any eq execute
test_case.modifiers: @Test @SuppressWarnings("unchecked") public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testExecute()
focal_class.declarator: s_log =
  		LoggerController.createLogger(AbstractSideBySideDiffPresentation.class)
focal_class.modifier: private final static
focal_class.original_string: private final static ILogger s_log =
  		LoggerController.createLogger(AbstractSideBySideDiffPresentation.class);
focal_class.type: ILogger
focal_class.var_name: s_log
focal_class.declarator: fileWrapperFactory = new FileWrapperFactoryImpl()
focal_class.modifier: protected
focal_class.original_string: protected FileWrapperFactory fileWrapperFactory = new FileWrapperFactoryImpl();
focal_class.type: FileWrapperFactory
focal_class.var_name: fileWrapperFactory
focal_class.declarator: ioutils = new IOUtilitiesImpl()
focal_class.modifier: protected
focal_class.original_string: protected IOUtilities ioutils = new IOUtilitiesImpl();
focal_class.type: IOUtilities
focal_class.var_name: ioutils
focal_class.declarator: dialectFactory = new DialectFactoryImpl()
focal_class.modifier: private
focal_class.original_string: private IDialectFactory dialectFactory = new DialectFactoryImpl();
focal_class.type: IDialectFactory
focal_class.var_name: dialectFactory
focal_class.file: sql12/plugins/dbdiff/src/main/java/net/sourceforge/squirrel_sql/plugins/dbdiff/gui/AbstractSideBySideDiffPresentation.java
focal_class.identifier: AbstractSideBySideDiffPresentation
focal_class.class_method_signature: AbstractSideBySideDiffPresentation.executeDiff(String script1Filename, String script2Filename)
focal_class.full_signature: protected abstract void executeDiff(String script1Filename, String script2Filename)
focal_class.identifier: executeDiff
focal_class.modifiers: protected abstract
focal_class.parameters: (String script1Filename, String script2Filename)
focal_class.return: void
focal_class.signature: void executeDiff(String script1Filename, String script2Filename)
focal_class.class_method_signature: AbstractSideBySideDiffPresentation.execute()
focal_class.full_signature: @Override public void execute()
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void execute()
focal_class.class_method_signature: AbstractSideBySideDiffPresentation.writeScriptToFile(String sqlscript, String file)
focal_class.full_signature: private void writeScriptToFile(String sqlscript, String file)
focal_class.identifier: writeScriptToFile
focal_class.modifiers: private
focal_class.parameters: (String sqlscript, String file)
focal_class.return: void
focal_class.signature: void writeScriptToFile(String sqlscript, String file)
focal_class.class_method_signature: AbstractSideBySideDiffPresentation.convertArrayToList(IDatabaseObjectInfo[] dbObjs)
focal_class.full_signature: private List<ITableInfo> convertArrayToList(IDatabaseObjectInfo[] dbObjs)
focal_class.identifier: convertArrayToList
focal_class.modifiers: private
focal_class.parameters: (IDatabaseObjectInfo[] dbObjs)
focal_class.return: List<ITableInfo>
focal_class.signature: List<ITableInfo> convertArrayToList(IDatabaseObjectInfo[] dbObjs)
focal_class.class_method_signature: AbstractSideBySideDiffPresentation.constructScriptFromList(List<String> sqlscript)
focal_class.full_signature: private String constructScriptFromList(List<String> sqlscript)
focal_class.identifier: constructScriptFromList
focal_class.modifiers: private
focal_class.parameters: (List<String> sqlscript)
focal_class.return: String
focal_class.signature: String constructScriptFromList(List<String> sqlscript)
focal_class.class_method_signature: AbstractSideBySideDiffPresentation.setFileWrapperFactory(FileWrapperFactory fileWrapperFactory)
focal_class.full_signature: public void setFileWrapperFactory(FileWrapperFactory fileWrapperFactory)
focal_class.identifier: setFileWrapperFactory
focal_class.modifiers: public
focal_class.parameters: (FileWrapperFactory fileWrapperFactory)
focal_class.return: void
focal_class.signature: void setFileWrapperFactory(FileWrapperFactory fileWrapperFactory)
focal_class.class_method_signature: AbstractSideBySideDiffPresentation.setIoutils(IOUtilities ioutils)
focal_class.full_signature: public void setIoutils(IOUtilities ioutils)
focal_class.identifier: setIoutils
focal_class.modifiers: public
focal_class.parameters: (IOUtilities ioutils)
focal_class.return: void
focal_class.signature: void setIoutils(IOUtilities ioutils)
focal_class.class_method_signature: AbstractSideBySideDiffPresentation.setDialectFactory(IDialectFactory dialectFactory)
focal_class.full_signature: public void setDialectFactory(IDialectFactory dialectFactory)
focal_class.identifier: setDialectFactory
focal_class.modifiers: public
focal_class.parameters: (IDialectFactory dialectFactory)
focal_class.return: void
focal_class.signature: void setDialectFactory(IDialectFactory dialectFactory)
focal_class.superclass: extends AbstractDiffPresentation
focal_method.body: @Override
  	public void execute()
  	{
  
  		final ISession sourceSession = sessionInfoProvider.getSourceSession();
  		final IScriptFileManager scriptFileManager = sessionInfoProvider.getScriptFileManager();
  
  		final IDatabaseObjectInfo[] selectedDestObjects = sessionInfoProvider.getDestSelectedDatabaseObjects();
  		final ISession destSession = sessionInfoProvider.getDestSession();
  		final IDatabaseObjectInfo[] selectedSourceObjects =
  			sessionInfoProvider.getSourceSelectedDatabaseObjects();
  
  		// Here we use the same dialect for both the source and destination object.
  		final HibernateDialect dialect = dialectFactory.getDialect(sourceSession.getMetaData());
  
  		final CreateScriptPreferences csprefs = new CreateScriptPreferences();
  
  		final List<ITableInfo> sourcetables = convertArrayToList(selectedSourceObjects);
  
  		final List<ITableInfo> desttables = convertArrayToList(selectedDestObjects);
  
  		try
  		{
  
  			final String script1 =
  				constructScriptFromList(dialect.getCreateTableSQL(sourcetables, sourceSession.getMetaData(),
  					csprefs, false, preferenceBean.isSortColumnsForSideBySideComparison()));
  
  			final String script2 =
  				constructScriptFromList(dialect.getCreateTableSQL(desttables, destSession.getMetaData(), csprefs,
  					false, preferenceBean.isSortColumnsForSideBySideComparison()));
  
  			final String sourceFilename = scriptFileManager.getOutputFilenameForSession(sourceSession, 1);
  			final String destFilename = scriptFileManager.getOutputFilenameForSession(destSession, 2);
  
  			writeScriptToFile(script1, sourceFilename);
  			writeScriptToFile(script2, destFilename);
  
  			executeDiff(sourceFilename, destFilename);
  		}
  		catch (final Exception e)
  		{
  			s_log.error("Unexpected exception while generating sql scripts : " + e.getMessage(), e);
  		}
  
  	}
focal_method.class_method_signature: AbstractSideBySideDiffPresentation.execute()
focal_method.full_signature: @Override public void execute()
focal_method.identifier: execute
focal_method.invocations: getSourceSession getScriptFileManager getDestSelectedDatabaseObjects getDestSession getSourceSelectedDatabaseObjects getDialect getMetaData convertArrayToList convertArrayToList constructScriptFromList getCreateTableSQL getMetaData isSortColumnsForSideBySideComparison constructScriptFromList getCreateTableSQL getMetaData isSortColumnsForSideBySideComparison getOutputFilenameForSession getOutputFilenameForSession writeScriptToFile writeScriptToFile executeDiff error getMessage
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void execute()