Esempio n. 1
0
 public void DBConnectorTestGetUsername()
 {
     DBConnector testConnection = new DBConnector();
     try
     {
         testConnection.connectToDB();
         Assert.AreEqual("jbuena", testConnection.getConnectedUser("349ADEAA08EA"));
         testConnection.disconnectFromDB();
     }
     catch
     {
         Assert.Inconclusive();
     }
 }
Esempio n. 2
0
 public void DBConnectorTestGetData()
 {
     DBConnector testConnection = new DBConnector();
     try
     {
         testConnection.connectToDB();
         Dictionary<string, string> testinfo = new Dictionary<string, string>();
         testinfo = testConnection.getUserData("jbuena");
         Assert.AreEqual(testinfo["firstName"], "Jamar");
         Assert.AreEqual(testinfo["lastName"], "Buena");
         Assert.AreEqual(testinfo["userName"], "jbuena");
         Assert.AreEqual(testinfo["city"], "Conshohocken");
         Assert.AreEqual(testinfo["department"], "Creative");
         Assert.AreEqual(testinfo["email"], "*****@*****.**");
         testConnection.disconnectFromDB();
     }
     catch
     {
         Assert.Inconclusive();
     }
 }