Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StubResultSetCollection">ResultSetCollection</see> class containing the elements of the specified source collection.
 /// </summary>
 /// <param name="value">A <see cref="StubResultSetCollection">ResultSetCollection</see> with which to initialize the collection.</param>
 public StubResultSetCollection(StubResultSetCollection value)
 {
     if (value != null)
     {
         this.AddRange(value);
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="StubDataReader"/> class. 
 /// Each row in the arraylist is a result set.
 /// </summary>
 /// <param name="resultSets">The result sets to add.</param>
 public StubDataReader(params StubResultSet[] resultSets)
 {
     this.stubResultSets = new StubResultSetCollection();
     foreach (StubResultSet resultSet in resultSets)
     {
         this.stubResultSets.Add(resultSet);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StubDataReader"/> class.
 /// Each row in the arraylist is a result set.
 /// </summary>
 /// <param name="resultSets">The result sets to add.</param>
 public StubDataReader(params StubResultSet[] resultSets)
 {
     this.stubResultSets = new StubResultSetCollection();
     foreach (StubResultSet resultSet in resultSets)
     {
         this.stubResultSets.Add(resultSet);
     }
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="StubDataReader"/> class.
        /// Each DataTable is a ResultSet
        /// </summary>
        /// <param name="tables">The tables to use as Results</param>
        public StubDbDataReader(params DataTable[] tables)
        {
            StubResultSetCollection col = new StubResultSetCollection();

            foreach (DataTable item in tables)
            {
                _hasRows.Add((item.Rows.Count > 0));
                col.Add(new StubResultSet(item));
            }

            _stubReader = new StubDataReader(col);
        }
        public void IsDBNull_Null_Test()
        {
            StubResultSetCollection stubResultSets = new StubResultSetCollection();
            stubResultSets.Add(CreateIsDBNullResultSet());

            StubDataReader target = new StubDataReader(stubResultSets);
            target.Read();
            int i = 0;
            bool expected = true;
            bool actual;
            actual = target.IsDBNull(i);
            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Adds the contents of another <see cref="StubResultSetCollection">ResultSetCollection</see> to the end of the collection.
        /// </summary>
        /// <param name="value">A <see cref="StubResultSetCollection">ResultSetCollection</see> containing the Components to add to the collection. </param>
        public void AddRange(StubResultSetCollection value)
        {
            if (value == null)
            {
                throw new ArgumentNullException("value", "Cannot add a range from null.");
            }

            if (value != null)
            {
                for (int i = 0; (i < value.Count); i = (i + 1))
                {
                    this.Add((StubResultSet)value.List[i]);
                }
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ResultSetCollectionEnumerator">ResultSetCollectionEnumerator</see> class referencing the specified <see cref="StubResultSetCollection">ResultSetCollection</see> object.
 /// </summary>
 /// <param name="mappings">The <see cref="StubResultSetCollection">ResultSetCollection</see> to enumerate.</param>
 public ResultSetCollectionEnumerator(StubResultSetCollection mappings)
 {
     _temp = mappings;
     _enumerator = _temp.GetEnumerator();
 }
        /// <summary>
        /// Adds the contents of another <see cref="StubResultSetCollection">ResultSetCollection</see> to the end of the collection.
        /// </summary>
        /// <param name="value">A <see cref="StubResultSetCollection">ResultSetCollection</see> containing the Components to add to the collection. </param>
        public void AddRange(StubResultSetCollection value)
        {
            if (value == null)
                throw new ArgumentNullException("value", "Cannot add a range from null.");

            if (value != null)
            {
                for (int i = 0; (i < value.Count); i = (i + 1))
                {
                    this.Add((StubResultSet)value.List[i]);
                }
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="StubResultSetCollection">ResultSetCollection</see> class containing the elements of the specified source collection.
 /// </summary>
 /// <param name="value">A <see cref="StubResultSetCollection">ResultSetCollection</see> with which to initialize the collection.</param>
 public StubResultSetCollection(StubResultSetCollection value)
 {
     if (value != null)
     {
         this.AddRange(value);
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="StubDataReader"/> class. 
 /// Each row in the arraylist is a result set.
 /// </summary>
 /// <param name="stubResultSets">The result sets.</param>
 public StubDataReader(StubResultSetCollection stubResultSets)
 {
     this.stubResultSets = stubResultSets;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="StubDataReader"/> class. 
 /// Each row in the arraylist is a result set.
 /// </summary>
 /// <param name="stubResultSets">The result sets.</param>
 public StubDbDataReader(StubResultSetCollection stubResultSets)
 {
     _stubReader = new StubDataReader(stubResultSets);
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="StubDataReader"/> class. 
        /// Each DataTable is a ResultSet
        /// </summary>
        /// <param name="tables">The tables to use as Results</param>
        public StubDbDataReader(params DataTable[] tables)
        {
            StubResultSetCollection col = new StubResultSetCollection();
            foreach (DataTable item in tables)
            {
                _hasRows.Add((item.Rows.Count > 0));
                col.Add(new StubResultSet(item));
            }

            _stubReader = new StubDataReader(col);
        }
Ejemplo n.º 13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StubDataReader"/> class.
 /// Each row in the arraylist is a result set.
 /// </summary>
 /// <param name="stubResultSets">The result sets.</param>
 public StubDbDataReader(StubResultSetCollection stubResultSets)
 {
     _stubReader = new StubDataReader(stubResultSets);
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StubDataReader"/> class.
 /// Each row in the arraylist is a result set.
 /// </summary>
 /// <param name="stubResultSets">The result sets.</param>
 public StubDataReader(StubResultSetCollection stubResultSets)
 {
     this.stubResultSets = stubResultSets;
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ResultSetCollectionEnumerator">ResultSetCollectionEnumerator</see> class referencing the specified <see cref="StubResultSetCollection">ResultSetCollection</see> object.
 /// </summary>
 /// <param name="mappings">The <see cref="StubResultSetCollection">ResultSetCollection</see> to enumerate.</param>
 public ResultSetCollectionEnumerator(StubResultSetCollection mappings)
 {
     _temp       = mappings;
     _enumerator = _temp.GetEnumerator();
 }