public void QueryTestFound() { var expected = 1; DataSet ds = _dal.ExecuteQuery(_conn, "select * from USERS where userID = '*****@*****.**' AND userName = '******' AND removed = 0"); var actual = ds.Tables[0].Rows.Count; Assert.AreEqual(expected, actual); }
//validators public bool IsDocumentExists(IDBConnection conn, string docID) { var retval = true; DataSet ds = _dal.ExecuteQuery(conn, "select * from documents where document_id = '" + docID + "'"); if (ds.Tables[0].Rows.Count == 0) { retval = false; } return(retval); }
public void ExecuteQueryTest() { var expected = 1; DataSet ds = _dal.ExecuteQuery(_connection, "SELECT * FROM USERS WHERE USER_ID = '*****@*****.**' AND USER_NAME = 'alon' AND REMOVED = 0"); var actual = ds.Tables[0].Rows.Count; Assert.AreEqual(expected, actual); }