Index: src/sas/qtgui/UnitTesting/DataExplorerTest.py
===================================================================
--- src/sas/qtgui/UnitTesting/DataExplorerTest.py	(revision 488c49d59f65f588ab30dc9447de6dc0335177cc)
+++ src/sas/qtgui/UnitTesting/DataExplorerTest.py	(revision 5032ea687fa17c1323c1124c0a7aa9d80184bf0b)
@@ -1,4 +1,6 @@
 import sys
 import unittest
+#from twisted.trial import unittest
+#from twisted.internet import reactor, defer, interfaces, threads, protocol, error
 
 from PyQt4.QtGui import *
@@ -20,7 +22,19 @@
     def setUp(self):
         '''Create the GUI'''
+        class MyPerspective(object):
+            def communicator(self):
+                return Communicate()
+            def allowBatch(self):
+                return False
+            def setData(self, data_list=None):
+                return None
+            def title(self):
+                return "Dummy Perspective"
+
         class dummy_manager(object):
             def communicator(self):
                 return Communicate()
+            def perspective(self):
+                return MyPerspective()
 
         self.form = DataExplorerWindow(None, dummy_manager())
@@ -67,12 +81,27 @@
 
     def testDeleteButton(self):
+        """
+        Functionality of the delete button
+        """
 
         deleteButton = self.form.cmdDelete
 
         # Mock the confirmation dialog with return=Yes
+        QtGui.QMessageBox.question = MagicMock(return_value=QtGui.QMessageBox.No)
 
         # Populate the model
-
-        # Assure the checkbox is on
+        filename = ["cyl_400_20.txt", "Dec07031.ASC", "cyl_400_20.txt"]
+        self.form.readData(filename)
+
+        # Assure the model contains three items
+        self.assertEqual(self.form.model.rowCount(), 3)
+
+        # Assure the checkboxes are on
+        item1 = self.form.model.item(0)
+        item2 = self.form.model.item(1)
+        item3 = self.form.model.item(2)
+        self.assertTrue(item1.checkState() == QtCore.Qt.Checked)
+        self.assertTrue(item2.checkState() == QtCore.Qt.Checked)
+        self.assertTrue(item3.checkState() == QtCore.Qt.Checked)
 
         # Click on the delete  button
@@ -80,24 +109,60 @@
 
         # Test the warning dialog called once
-        # self.assertTrue(QtGui.QFileDialog.getOpenFileName.called)
+        self.assertTrue(QtGui.QMessageBox.question.called)
+
+        # Assure the model still contains the items
+        self.assertEqual(self.form.model.rowCount(), 3)
+
+        # Now, mock the confirmation dialog with return=Yes
+        QtGui.QMessageBox.question = MagicMock(return_value=QtGui.QMessageBox.Yes)
+
+        # Click on the delete  button
+        QTest.mouseClick(deleteButton, Qt.LeftButton)
+
+        # Test the warning dialog called once
+        self.assertTrue(QtGui.QMessageBox.question.called)
 
         # Assure the model contains no items
-
-    def testSendToButton(self):        
-        sendToButton = self.form.cmdSendTo
-
-        # Mock the current perspective set_data method
-
+        self.assertEqual(self.form.model.rowCount(), 0)
+
+        # Click delete once again to assure no nasty behaviour on empty model
+        QTest.mouseClick(deleteButton, Qt.LeftButton)
+
+
+    def testSendToButton(self):
+        """
+        Test that clicking the Send To button sends checked data to a perspective
+        """
+        
         # Populate the model
+        filename = ["cyl_400_20.txt"]
+        self.form.readData(filename)
+
+        # setData is the method we want to see called
+        mocked = self.form.parent.perspective().setData
+        mocked = MagicMock(filename)
 
         # Assure the checkbox is on
+        self.form.cbSelect.setCurrentIndex(0)
 
         # Click on the Send To  button
-        QTest.mouseClick(sendToButton, Qt.LeftButton)
+        QTest.mouseClick(self.form.cmdSendTo, Qt.LeftButton)
 
         # Test the set_data method called once
-        # self.assertTrue(QtGui.QFileDialog.getOpenFileName.called)
-
-        # Assure the model contains no items
+        # self.assertTrue(mocked.called)
+
+        # open another file
+        filename = ["cyl_400_20.txt"]
+        self.form.readData(filename)
+
+        # Mock the warning message
+        QtGui.QMessageBox = MagicMock()
+
+        # Click on the button
+        QTest.mouseClick(self.form.cmdSendTo, Qt.LeftButton)
+
+        # Assure the message box popped up
+        QtGui.QMessageBox.assert_called_once()
+
 
     def testDataSelection(self):
@@ -159,5 +224,5 @@
     def testReadData(self):
         """
-        Test the readData() method
+        Test the low level readData() method
         """
         filename = ["cyl_400_20.txt"]
@@ -172,16 +237,7 @@
 
         # Expected two status bar updates
-        self.assertEqual(spy_status_update.count(), 2)
+        self.assertEqual(spy_status_update.count(), 1)
         self.assertIn(filename[0], str(spy_status_update.called()[0]['args'][0]))
-        self.assertIn("Loading Data Complete", str(spy_status_update.called()[1]['args'][0]))
-
-        # Expect one Data Received signal
-        self.assertEqual(spy_data_received.count(), 1)
-
-        # Assure returned dictionary has correct data
-        # We don't know the data ID, so need to iterate over dict
-        data_dict = spy_data_received.called()[0]['args'][0]
-        for data_key, data_value in data_dict.iteritems():
-            self.assertIsInstance(data_value, Data1D)
+
 
         # Check that the model contains the item
@@ -194,6 +250,9 @@
         self.assertEqual(model_name, filename[0])
 
-        # Assure add_data on data_manager was called (last call)
-        self.assertTrue(self.form.manager.add_data.called)
+    def testLoadFile(self):
+        """
+        Test the threaded call to readData()
+        """
+        pass
 
     def testGetWList(self):
@@ -206,25 +265,37 @@
             'HFIR 1D files (*.d1d);;DANSE files (*.sans);;NXS files (*.nxs)'
         self.assertEqual(defaults, list)
-
+       
     def testLoadComplete(self):
         """
-        """
-        # Initialize signal spy instances        
+        Test the callback method updating the data object
+        """
+
+        data_dict = {"a1":Data1D()}
+
+        self.form.manager.add_data = MagicMock()
+
+        # Initialize signal spy instances
         spy_status_update = QtSignalSpy(self.form, self.form.communicate.statusBarUpdateSignal)
         spy_data_received = QtSignalSpy(self.form, self.form.communicate.fileDataReceivedSignal)
 
-        # Need an empty Data1D object
-        mockData = Data1D()
-
-        # Call the tested method
-        self.form.loadComplete({"a":mockData}, message="test message")
-
-        # test the signals 
-        self.assertEqual(spy_status_update.count(), 1)
-        self.assertIn("message", str(spy_status_update.called()[0]['args'][0]))
+        # Read in the file
+        self.form.loadComplete(data_dict, message="Loading Data Complete")
+
+        # "Loading data complete" no longer sent in LoadFile but in callback
+        self.assertIn("Loading Data Complete", str(spy_status_update.called()[0]['args'][0]))
+
+        # Expect one Data Received signal
         self.assertEqual(spy_data_received.count(), 1)
 
-        # The data_manager update is going away, so don't bother testing
-       
+        # Assure returned dictionary has correct data
+        # We don't know the data ID, so need to iterate over dict
+        data_dict = spy_data_received.called()[0]['args'][0]
+        for data_key, data_value in data_dict.iteritems():
+            self.assertIsInstance(data_value, Data1D)
+
+        # Assure add_data on data_manager was called (last call)
+        self.assertTrue(self.form.manager.add_data.called)
+
+
 if __name__ == "__main__":
     unittest.main()
Index: src/sas/qtgui/UnitTesting/GuiManagerTest.py
===================================================================
--- src/sas/qtgui/UnitTesting/GuiManagerTest.py	(revision 488c49d59f65f588ab30dc9447de6dc0335177cc)
+++ src/sas/qtgui/UnitTesting/GuiManagerTest.py	(revision 5032ea687fa17c1323c1124c0a7aa9d80184bf0b)
@@ -9,13 +9,22 @@
 # Local
 from GuiManager import GuiManager
+from UI.MainWindowUI import MainWindow
 
-#app = QApplication(sys.argv)
+app = QApplication(sys.argv)
 
 class GuiManagerTest(unittest.TestCase):
-    '''Test the WelcomePanel'''
+    '''Test the Main Window functionality'''
     def setUp(self):
         '''Create the tested object'''
+        class MainSasViewWindow(MainWindow):
+            # Main window of the application
+            def __init__(self, reactor, parent=None):
+                super(MainSasViewWindow, self).__init__(parent)
+        
+                # define workspace for dialogs.
+                self.workspace = QWorkspace(self)
+                self.setCentralWidget(self.workspace)
 
-        self.manager = GuiManager(None)
+        self.manager = GuiManager(MainSasViewWindow(None), None)
 
     def tearDown(self):
@@ -52,4 +61,18 @@
         pass
 
+    def testActionLoadData(self):
+        """
+        Menu File/Load Data File(s)
+        """
+        # Mock the system file open method
+        QFileDialog.getOpenFileName = MagicMock(return_value=None)
+
+        # invoke the action
+
+        # Test the getOpenFileName() dialog called once
+        #self.assertTrue(QtGui.QFileDialog.getOpenFileName.called)
+        #QtGui.QFileDialog.getOpenFileName.assert_called_once()
+        
+
     # test each action separately
        
Index: src/sas/qtgui/UnitTesting/TestUtils.py
===================================================================
--- src/sas/qtgui/UnitTesting/TestUtils.py	(revision 488c49d59f65f588ab30dc9447de6dc0335177cc)
+++ src/sas/qtgui/UnitTesting/TestUtils.py	(revision 5032ea687fa17c1323c1124c0a7aa9d80184bf0b)
Index: src/sas/qtgui/UnitTesting/TestUtilsTest.py
===================================================================
--- src/sas/qtgui/UnitTesting/TestUtilsTest.py	(revision 488c49d59f65f588ab30dc9447de6dc0335177cc)
+++ src/sas/qtgui/UnitTesting/TestUtilsTest.py	(revision 5032ea687fa17c1323c1124c0a7aa9d80184bf0b)
@@ -18,13 +18,22 @@
     def testQtSignalSpy(self):
         '''Create the Spy the correct way'''
+        test_string = 'my precious'
 
+        def signalReceived(signal):
+            # Test the signal callback
+            self.assertEqual(signal, test_string)
+
+        communicator = Communicate()
+        communicator.statusBarUpdateSignal.connect(signalReceived)
+
+        # Define the signal spy for testing
         widget = QWidget()
-        signal = Communicate.statusBarUpdateSignal
-        self.spy = QtSignalSpy(widget, signal)
+        spy = QtSignalSpy(widget, communicator.statusBarUpdateSignal)
 
         # Emit a signal
-        signal.emit('aa')
+        communicator.statusBarUpdateSignal.emit(test_string)
 
-        # Test the spy object
+        # Was the signal caught by the signal spy?
+        self.assertEqual(spy.count(), 1)
 
 if __name__ == "__main__":
