Esempio n. 1
0
        public void SelectAll(string condition, string compareQuery)
        {
            int    errorNumber      = 0;
            string errorDescription = null;

            IList <Framework.DataServices.Model.EntityBaseData> result = _daoBase.SelectAll(
                _currentUser, condition, out errorNumber, out errorDescription);


            if (result == null)
            {
                throw new AssertTestException("Couldn't load all rows");
            }

            if (errorNumber != 0)
            {
                throw new AssertTestException("There is an error number = " + errorNumber);
            }

            if (!string.IsNullOrEmpty(errorDescription))
            {
                throw new AssertTestException("There is an error description = " + errorDescription);
            }


            object objResult = _commonDatabase.ExecuteScalar(
                System.Data.CommandType.Text, compareQuery, false, _currentUser);

            if (result.Count != (int)objResult)
            {
                throw new AssertTestException("There are differences between database and list returned.");
            }
        }
Esempio n. 2
0
        public IList <Framework.DataServices.Model.EntityBaseData> SelectAll(string condition)
        {
            int    errorNumber      = 0;
            string errorDescription = null;

            IList <Framework.DataServices.Model.EntityBaseData> list = _daoBase.SelectAll(
                _currentLogin, condition, out errorNumber, out errorDescription);

            if (errorNumber != 0 || !string.IsNullOrEmpty(errorDescription))
            {
                return(null);
            }

            return(list);
        }