示例#1
0
        public override void Validate(Context context)
        {
            if (string.IsNullOrEmpty(_creationPath))
            {
                throw new ArgumentNullException("CreationPath is either null or of zero length");
            }
            _creationPath = context.SubstituteWildCards(_creationPath);

            if (string.IsNullOrEmpty(_sourcePath))
            {
                throw new ArgumentNullException("SourcePath is either null or of zero length");
            }
            _sourcePath = context.SubstituteWildCards(_sourcePath);
        }
示例#2
0
        public override void Validate(Context context)
        {
            // _delayBeforeCheck - optional

            if (string.IsNullOrEmpty(ConnectionString))
            {
                throw new ArgumentNullException("ConnectionString is either null or of zero length");
            }
            ConnectionString = context.SubstituteWildCards(ConnectionString);

            if (null == SQLQuery)
            {
                throw new ArgumentNullException("ConnectionString is either null or of zero length");
            }

            SQLQuery.Validate(context);
        }
示例#3
0
        ///<summary>
        /// Validates the SqlQuery
        ///</summary>
        /// <param name='context'>The context for the test, this holds state that is passed beteen tests</param>
        ///<exception cref="ArgumentNullException"></exception>
        public void Validate(Context context)
        {
            string sqlQuery = GetFormattedSqlQuery(context);
            if (string.IsNullOrEmpty(sqlQuery))
            {
                throw new ArgumentNullException("The Sql Query cannot be formmatted correctly");
            }

            for (int c = 0; c < QueryParameters.Count; c++)
            {
                if (QueryParameters[c] is string)
                {
                    QueryParameters[c] = context.SubstituteWildCards((string)QueryParameters[c]);
                }
            }

            RawSqlQuery = context.SubstituteWildCards(RawSqlQuery);
        }