public void test_connectToDatabase()
        {
            Services_OunceV6.startService_MySql();
            // check that the connection is working
            Assert.That(OunceMySql.isConnectionOpen());

            // load config and recheck connectoin
            MySqlConfig.setMySqlConnectionDetailsFromAppConfig();
            Assert.That(OunceMySql.refreshDbConnection());
            Assert.That(OunceMySql.isConnectionOpen());
            // set up a bad pwd
            OunceMySql.MySqlLoginUsername = "******";
            Assert.That(false == OunceMySql.refreshDbConnection());

            // reload config and recheck connection
            MySqlConfig.setMySqlConnectionDetailsFromAppConfig();
            Assert.That(OunceMySql.refreshDbConnection());
        }
 public void testMySqlDetails(IStep step)
 {
     // run tasks on separate thread
     O2Thread.mtaThread(
         () => {
         step.append_Line("Trying to connect and loging to MySql server \r\n");
         if (OunceMySql.isConnectionOpen())
         {
             step.append_Line("ALL OK: Sucessfully connected to MySql database");
         }
         else
         {
             step.append_Line("ERROR!: It was not possible to connected to MySql database, check Log Viewer for error details");
         }
         step.append_Line("");
         step.append_Line("Test completed");
     });
 }