Example #1
0
        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);
        }
Example #2
0
        //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);
        }
Example #3
0
        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);
        }