Index: src/sas/qtgui/UnitTesting/DensityCalculatorTest.py
===================================================================
--- src/sas/qtgui/UnitTesting/DensityCalculatorTest.py	(revision f140169443021ad4b287ff973659ce4f957b348a)
+++ src/sas/qtgui/UnitTesting/DensityCalculatorTest.py	(revision e4676c8d2eeeb838ff2930256562879159f87ae6)
@@ -15,5 +15,5 @@
 from DensityPanel import DensityPanel
 from DensityPanel import toMolarMass
-from DensityPanel import FormulaValidator
+from GuiUtils import FormulaValidator
 
 import LocalConfig
@@ -37,31 +37,4 @@
     def testBadInputStr(self):
         self.assertEqual(toMolarMass("Im a bad string"), "")
-
-class FormulaValidatorTest(unittest.TestCase):
-    """ Test the formula validator """
-    def setUp(self):
-        '''Create the validator'''
-        self.validator = FormulaValidator()
-
-    def tearDown(self):
-        '''Destroy the validator'''
-        self.validator = None
-
-    def testValidateGood(self):
-        """Test a valid Formula """
-        formula_good = "H24O12C4C6N2Pu"
-        self.assertEqual(self.validator.validate(formula_good, 1)[0], QtGui.QValidator.Acceptable)
-
-        formula_good = "(H2O)0.5(D2O)0.5"
-        self.assertEqual(self.validator.validate(formula_good, 1)[0], QtGui.QValidator.Acceptable)
-
-    def testValidateBad(self):
-        """Test a valid Formula """
-        formula_bad = "H24 %%%O12C4C6N2Pu"
-        self.assertRaises(self.validator.validate(formula_bad, 1)[0])
-        self.assertEqual(self.validator.validate(formula_bad, 1)[0], QtGui.QValidator.Intermediate)
-
-        formula_bad = [1]
-        self.assertEqual(self.validator.validate(formula_bad, 1)[0], QtGui.QValidator.Intermediate)
 
 class DensityCalculatorTest(unittest.TestCase):
Index: src/sas/qtgui/UnitTesting/GuiUtilsTest.py
===================================================================
--- src/sas/qtgui/UnitTesting/GuiUtilsTest.py	(revision 9968d6aeb28c6ec676bf3f34c564f14679fa8ad9)
+++ src/sas/qtgui/UnitTesting/GuiUtilsTest.py	(revision e4676c8d2eeeb838ff2930256562879159f87ae6)
@@ -324,4 +324,31 @@
         self.assertFalse(os.path.isfile(file_name))
 
+class FormulaValidatorTest(unittest.TestCase):
+    """ Test the formula validator """
+    def setUp(self):
+        '''Create the validator'''
+        self.validator = FormulaValidator()
+
+    def tearDown(self):
+        '''Destroy the validator'''
+        self.validator = None
+
+    def testValidateGood(self):
+        """Test a valid Formula """
+        formula_good = "H24O12C4C6N2Pu"
+        self.assertEqual(self.validator.validate(formula_good, 1)[0], QtGui.QValidator.Acceptable)
+
+        formula_good = "(H2O)0.5(D2O)0.5"
+        self.assertEqual(self.validator.validate(formula_good, 1)[0], QtGui.QValidator.Acceptable)
+
+    def testValidateBad(self):
+        """Test a valid Formula """
+        formula_bad = "H24 %%%O12C4C6N2Pu"
+        self.assertRaises(self.validator.validate(formula_bad, 1)[0])
+        self.assertEqual(self.validator.validate(formula_bad, 1)[0], QtGui.QValidator.Intermediate)
+
+        formula_bad = [1]
+        self.assertEqual(self.validator.validate(formula_bad, 1)[0], QtGui.QValidator.Intermediate)
+
 
 if __name__ == "__main__":
Index: src/sas/qtgui/UnitTesting/SLDCalculatorTest.py
===================================================================
--- src/sas/qtgui/UnitTesting/SLDCalculatorTest.py	(revision e4676c8d2eeeb838ff2930256562879159f87ae6)
+++ src/sas/qtgui/UnitTesting/SLDCalculatorTest.py	(revision e4676c8d2eeeb838ff2930256562879159f87ae6)
@@ -0,0 +1,145 @@
+import sys
+import unittest
+import webbrowser
+
+from PyQt4 import QtGui
+from PyQt4.QtTest import QTest
+from PyQt4 import QtCore
+from mock import MagicMock
+
+####### TEMP
+import LocalSetup
+#######
+
+# Local
+from SldPanel import SldResult
+from SldPanel import SldPanel
+from SldPanel import sldAlgorithm
+from GuiUtils import FormulaValidator
+
+import LocalConfig
+
+app = QtGui.QApplication(sys.argv)
+
+class SldResultTest(unittest.TestCase):
+    """ Test the simple container class"""
+    def testObjectSize(self):
+        results = SldResult(0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
+                            0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
+        self.assertEqual(sys.getsizeof(results), 56)
+
+
+class SldAlgorithmTest(unittest.TestCase):
+    """ Test the periodictable wrapper """
+    def testSldAlgorithm1(self):
+        molecular_formula = "H2O"
+        mass_density = 1.0
+        wavelength = 6.0
+        
+        results = sldAlgorithm( molecular_formula,
+                                mass_density,
+                                wavelength)
+        self.assertIsInstance(results, SldResult)
+        self.assertAlmostEqual(results.neutron_length, 0.175463, 5)
+        self.assertAlmostEqual(results.neutron_inc_xs, 5.365857, 5)
+        self.assertAlmostEqual(results.neutron_abs_xs, 0.074224, 5)
+
+    def testSldAlgorithm2(self):
+        molecular_formula = "C29O[18]5+7NH[2]3"
+        mass_density = 3.0
+        wavelength = 666.0
+        
+        results = sldAlgorithm( molecular_formula,
+                                mass_density,
+                                wavelength)
+        self.assertIsInstance(results, SldResult)
+        self.assertAlmostEqual(results.neutron_length,   0.059402, 5)
+        self.assertAlmostEqual(results.neutron_inc_xs,   0.145427, 5)
+        self.assertAlmostEqual(results.neutron_abs_xs,  15.512215, 5)
+        self.assertAlmostEqual(results.neutron_sld_real, 1.3352833e-05, 5)
+        self.assertAlmostEqual(results.neutron_sld_imag, 1.1645807e-10, 5)
+
+
+class SLDCalculatorTest(unittest.TestCase):
+    '''Test the SLDCalculator'''
+    def setUp(self):
+        '''Create the SLDCalculator'''
+        self.widget = SldPanel(None)
+
+    def tearDown(self):
+        '''Destroy the DensityCalculator'''
+        self.widget.close()
+        self.widget = None
+
+    def testDefaults(self):
+        '''Test the GUI in its default state'''
+        self.assertIsInstance(self.widget, QtGui.QWidget)
+        self.assertEqual(self.widget.windowTitle(), "SLD Calculator")
+        self.assertIsInstance(self.widget.ui.editMolecularFormula.validator(), FormulaValidator)
+        self.assertEqual(self.widget.ui.editMolecularFormula.styleSheet(), '')
+        self.assertEqual(self.widget.model.columnCount(), 1)
+        self.assertEqual(self.widget.model.rowCount(), 12)
+        self.assertEqual(self.widget.sizePolicy().Policy(), QtGui.QSizePolicy.Fixed)
+
+    def testSimpleEntry(self):
+        ''' Default compound calculations '''
+
+        self.widget.show()
+
+        self.widget.ui.editMassDensity.clear()
+        self.widget.ui.editMassDensity.insert("1.0")
+        # Send tab x3
+        key = QtCore.Qt.Key_Tab
+        QTest.keyEvent(QTest.Press, self.widget, key, QtCore.Qt.NoModifier)
+        QTest.keyEvent(QTest.Press, self.widget, key, QtCore.Qt.NoModifier)
+        QtGui.qApp.processEvents()
+        QTest.qWait(100)
+
+        # Assure the output fields are set
+        self.assertEqual(self.widget.ui.editNeutronIncXs.text(), '5.37')
+
+        # Change mass density
+        self.widget.ui.editWavelength.clear()
+        self.widget.ui.editWavelength.setText("666.0")
+
+        # Send shift-tab to update the molar volume field
+        QTest.keyEvent(QTest.Press, self.widget, key, QtCore.Qt.NoModifier)
+        QTest.keyEvent(QTest.Press, self.widget, key, QtCore.Qt.NoModifier)
+        QtGui.qApp.processEvents()
+        QTest.qWait(100)
+
+        # Assure the molar volume field got updated
+        self.assertEqual(self.widget.ui.editNeutronAbsXs.text(), '8.24')
+
+    def testComplexEntryAndReset(self):
+        ''' User entered compound calculations and subsequent reset'''
+
+        self.widget.ui.editMolecularFormula.clear()
+        self.widget.ui.editMolecularFormula.insert("CaCO[18]3+6H2O")
+        self.widget.ui.editMassDensity.insert("5.0")
+
+        self.widget.show()
+        # Send tab x2
+        key = QtCore.Qt.Key_Tab
+        QTest.keyEvent(QTest.Press, self.widget, key, QtCore.Qt.NoModifier)
+        QTest.keyEvent(QTest.Press, self.widget, key, QtCore.Qt.NoModifier)
+        QTest.qWait(100)
+
+        # Assure the mass density field is set
+        self.assertEqual(self.widget.ui.editNeutronIncXs.text(), '40.6')
+
+        # Reset the widget
+        self.widget.modelReset()
+
+        self.assertEqual(self.widget.ui.editMolecularFormula.text(), "H2O")
+        self.assertEqual(self.widget.ui.editMassDensity.text(), "1")
+        self.assertEqual(self.widget.ui.editWavelength.text(), "6")
+
+    def testHelp(self):
+        """ Assure help file is shown """
+
+        # this should not rise
+        self.widget.displayHelp()
+
+if __name__ == "__main__":
+    unittest.main()
