From: Choy R. <ch...@us...> - 2005-02-12 09:49:20
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework/Data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1821/DotNetMock.Framework/Data Modified Files: MockDbDataAdapter.cs Log Message: Finished eliminating all warnings about missing XML comments. Index: MockDbDataAdapter.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework/Data/MockDbDataAdapter.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MockDbDataAdapter.cs 12 Feb 2005 08:53:57 -0000 1.8 --- MockDbDataAdapter.cs 12 Feb 2005 09:49:11 -0000 1.9 *************** *** 1,10 **** using System; using System.Data; using System.Data.Common; - using DotNetMock; namespace DotNetMock.Framework.Data { public class MockDbDataAdapter : DbDataAdapter, IMockObject, IDbDataAdapter { --- 1,19 ---- + #region License + // Copyright (c) 2004, 2005 Griffin Caprio & Choy Rim. All rights reserved. + #endregion + #region Imports using System; using System.Data; using System.Data.Common; + using DotNetMock; + #endregion namespace DotNetMock.Framework.Data { + /// <summary> + /// Mock <see cref="DbDataAdapter"/>. + /// </summary> + /// <author>Griffin Caprio</author> public class MockDbDataAdapter : DbDataAdapter, IMockObject, IDbDataAdapter { *************** *** 20,27 **** --- 29,42 ---- #region Public Constructors + /// <summary> + /// Create mock <see cref="DbDataAdapter"/>. + /// </summary> public MockDbDataAdapter() { this._name = "MockDbDataAdapter"; } + /// <summary> + /// Create mock <see cref="DbDataAdapter"/>. + /// </summary> public MockDbDataAdapter( IDbCommand selectCommand ) { *************** *** 29,32 **** --- 44,50 ---- } + /// <summary> + /// Create mock <see cref="DbDataAdapter"/>. + /// </summary> public MockDbDataAdapter( IDbCommand selectCommand, string selectConnectionString ) { *************** *** 34,37 **** --- 52,58 ---- } + /// <summary> + /// Create mock <see cref="DbDataAdapter"/>. + /// </summary> public MockDbDataAdapter( string selectCommandText, IDbConnection selectConnection ) { *************** *** 41,48 **** --- 62,78 ---- #region Mock Methods + /// <summary> + /// Set the expected number of Fill calls. + /// </summary> + /// <param name="calls">number of expected Fill calls</param> public void SetExpectedFillCalls( int calls ) { _expectedFillCalls.Expected = calls; } + /// <summary> + /// Set the <see cref="DataSet"/> that will be returned by + /// the Fill call. + /// </summary> + /// <param name="dataSet">expected <see cref="DataSet"/></param> public void SetExpectedDataSet( DataSet dataSet ) { *************** *** 52,60 **** #region Implementation of IMockObject public void NotImplemented(string methodName) { throw new NotImplementedException( methodName + " is currently not implemented." ); } ! public string MockName { --- 82,96 ---- #region Implementation of IMockObject + /// <summary> + /// <see cref="IMockObject.NotImplemented"/> + /// </summary> + /// <param name="methodName">name of method not implemented</param> public void NotImplemented(string methodName) { throw new NotImplementedException( methodName + " is currently not implemented." ); } ! /// <summary> ! /// Name of this mock object. ! /// </summary> public string MockName { *************** *** 71,74 **** --- 107,113 ---- #region Implementation of IVerifiable + /// <summary> + /// <see cref="IVerifiable.Verify"/> + /// </summary> public void Verify() { *************** *** 79,102 **** #region Implementation of DbDataAdapter ! protected override System.Data.Common.RowUpdatedEventArgs CreateRowUpdatedEvent(System.Data.DataRow dataRow, System.Data.IDbCommand command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) { return null; } ! protected override System.Data.Common.RowUpdatingEventArgs CreateRowUpdatingEvent(System.Data.DataRow dataRow, System.Data.IDbCommand command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) { return null; } ! protected override void OnRowUpdated(System.Data.Common.RowUpdatedEventArgs value) { } ! protected override void OnRowUpdating(System.Data.Common.RowUpdatingEventArgs value) { } protected override int Fill(System.Data.DataTable dataTable, System.Data.IDataReader dataReader) { --- 118,152 ---- #region Implementation of DbDataAdapter ! /// <summary> ! /// <see cref="DbDataAdapter.CreateRowUpdatingEvent"/> ! /// </summary> protected override System.Data.Common.RowUpdatedEventArgs CreateRowUpdatedEvent(System.Data.DataRow dataRow, System.Data.IDbCommand command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) { return null; } ! /// <summary> ! /// <see cref="DbDataAdapter.CreateRowUpdatingEvent"/> ! /// </summary> protected override System.Data.Common.RowUpdatingEventArgs CreateRowUpdatingEvent(System.Data.DataRow dataRow, System.Data.IDbCommand command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) { return null; } ! /// <summary> ! /// <see cref="DbDataAdapter.OnRowUpdating"/> ! /// </summary> protected override void OnRowUpdated(System.Data.Common.RowUpdatedEventArgs value) { } ! /// <summary> ! /// <see cref="DbDataAdapter.OnRowUpdating"/> ! /// </summary> protected override void OnRowUpdating(System.Data.Common.RowUpdatingEventArgs value) { } + /// <summary> + /// <see cref="DbDataAdapter.Fill"/> + /// </summary> protected override int Fill(System.Data.DataTable dataTable, System.Data.IDataReader dataReader) { *************** *** 104,108 **** return 0; } ! protected override int Fill(System.Data.DataSet dataSet, string srcTable, System.Data.IDataReader dataReader, int startRecord, int maxRecords) { --- 154,160 ---- return 0; } ! /// <summary> ! /// <see cref="DbDataAdapter.Fill"/> ! /// </summary> protected override int Fill(System.Data.DataSet dataSet, string srcTable, System.Data.IDataReader dataReader, int startRecord, int maxRecords) { *************** *** 110,114 **** return 0; } ! protected override int Fill(System.Data.DataTable dataTable, System.Data.IDbCommand command, System.Data.CommandBehavior behavior) { --- 162,168 ---- return 0; } ! /// <summary> ! /// <see cref="DbDataAdapter.Fill"/> ! /// </summary> protected override int Fill(System.Data.DataTable dataTable, System.Data.IDbCommand command, System.Data.CommandBehavior behavior) { *************** *** 116,120 **** return 0; } ! protected override int Fill(System.Data.DataSet dataSet, int startRecord, int maxRecords, string srcTable, System.Data.IDbCommand command, System.Data.CommandBehavior behavior) { --- 170,176 ---- return 0; } ! /// <summary> ! /// <see cref="DbDataAdapter.Fill"/> ! /// </summary> protected override int Fill(System.Data.DataSet dataSet, int startRecord, int maxRecords, string srcTable, System.Data.IDbCommand command, System.Data.CommandBehavior behavior) { *************** *** 122,126 **** return 0; } ! public override int Fill(System.Data.DataSet dataSet) { --- 178,184 ---- return 0; } ! /// <summary> ! /// <see cref="DbDataAdapter.Fill"/> ! /// </summary> public override int Fill(System.Data.DataSet dataSet) { *************** *** 128,131 **** --- 186,192 ---- return 0; } + /// <summary> + /// <see cref="DbDataAdapter.Fill"/> + /// </summary> public new int Fill( System.Data.DataSet dataSet, string srcTable ) { *************** *** 133,136 **** --- 194,200 ---- return 0; } + /// <summary> + /// <see cref="DbDataAdapter.Fill"/> + /// </summary> public new int Fill( System.Data.DataSet dataSet, int startRecord, int maxRecords, string srcTable ) { *************** *** 138,141 **** --- 202,208 ---- return 0; } + /// <summary> + /// <see cref="DbDataAdapter.Fill"/> + /// </summary> public new int Fill( DataTable dataTable ) { *************** *** 143,203 **** return 0; } ! protected override void Dispose(bool disposing) { } protected override System.Data.DataTable FillSchema(System.Data.DataTable dataTable, System.Data.SchemaType schemaType, System.Data.IDbCommand command, System.Data.CommandBehavior behavior) { return null; } ! protected override System.Data.DataTable[] FillSchema(System.Data.DataSet dataSet, System.Data.SchemaType schemaType, System.Data.IDbCommand command, string srcTable, System.Data.CommandBehavior behavior) { return null; } protected new System.Data.DataTable[] FillSchema(System.Data.DataSet dataSet, System.Data.SchemaType schemaType, string srcTable ) { return null; } public override System.Data.DataTable[] FillSchema(System.Data.DataSet dataSet, System.Data.SchemaType schemaType) { return null; } public new System.Data.DataTable FillSchema(System.Data.DataTable dataTable, System.Data.SchemaType schemaType) { return null; } - private void innerExecute() { _expectedFillCalls.Inc(); } ! public override System.Data.IDataParameter[] GetFillParameters() { return null; } ! protected override void OnFillError(System.Data.FillErrorEventArgs value) { } protected override int Update(System.Data.DataRow[] dataRows, System.Data.Common.DataTableMapping tableMapping) { return 0; } public new int Update(System.Data.DataSet dataSet, string srcTable) { return 0; } public new int Update(System.Data.DataTable dataTable) { return 0; } public new int Update(System.Data.DataRow[] dataRows) { return 0; } public override int Update(System.Data.DataSet dataSet) { --- 210,304 ---- return 0; } ! /// <summary> ! /// <see cref="DbDataAdapter.Dispose"/> ! /// </summary> protected override void Dispose(bool disposing) { } + /// <summary> + /// <see cref="DbDataAdapter.FillSchema"/> + /// </summary> protected override System.Data.DataTable FillSchema(System.Data.DataTable dataTable, System.Data.SchemaType schemaType, System.Data.IDbCommand command, System.Data.CommandBehavior behavior) { return null; } ! /// <summary> ! /// <see cref="DbDataAdapter.FillSchema"/> ! /// </summary> protected override System.Data.DataTable[] FillSchema(System.Data.DataSet dataSet, System.Data.SchemaType schemaType, System.Data.IDbCommand command, string srcTable, System.Data.CommandBehavior behavior) { return null; } + /// <summary> + /// <see cref="DbDataAdapter.FillSchema"/> + /// </summary> protected new System.Data.DataTable[] FillSchema(System.Data.DataSet dataSet, System.Data.SchemaType schemaType, string srcTable ) { return null; } + /// <summary> + /// <see cref="DbDataAdapter.FillSchema"/> + /// </summary> public override System.Data.DataTable[] FillSchema(System.Data.DataSet dataSet, System.Data.SchemaType schemaType) { return null; } + /// <summary> + /// <see cref="DbDataAdapter.FillSchema"/> + /// </summary> public new System.Data.DataTable FillSchema(System.Data.DataTable dataTable, System.Data.SchemaType schemaType) { return null; } private void innerExecute() { _expectedFillCalls.Inc(); } ! /// <summary> ! /// <see cref="DbDataAdapter.GetFillParameters"/> ! /// </summary> public override System.Data.IDataParameter[] GetFillParameters() { return null; } ! /// <summary> ! /// <see cref="DbDataAdapter.OnFillError"/> ! /// </summary> protected override void OnFillError(System.Data.FillErrorEventArgs value) { } + /// <summary> + /// <see cref="DbDataAdapter.Update"/> + /// </summary> protected override int Update(System.Data.DataRow[] dataRows, System.Data.Common.DataTableMapping tableMapping) { return 0; } + /// <summary> + /// <see cref="DbDataAdapter.Update"/> + /// </summary> public new int Update(System.Data.DataSet dataSet, string srcTable) { return 0; } + /// <summary> + /// <see cref="DbDataAdapter.Update"/> + /// </summary> public new int Update(System.Data.DataTable dataTable) { return 0; } + /// <summary> + /// <see cref="DbDataAdapter.Update"/> + /// </summary> public new int Update(System.Data.DataRow[] dataRows) { return 0; } + /// <summary> + /// <see cref="DbDataAdapter.Update"/> + /// </summary> public override int Update(System.Data.DataSet dataSet) { *************** *** 207,211 **** #region IDbDataAdapter Members ! public IDbCommand UpdateCommand { --- 308,314 ---- #region IDbDataAdapter Members ! /// <summary> ! /// <see cref="IDbDataAdapter.UpdateCommand"/> ! /// </summary> public IDbCommand UpdateCommand { *************** *** 219,223 **** } } ! public IDbCommand SelectCommand { --- 322,328 ---- } } ! /// <summary> ! /// <see cref="IDbDataAdapter.SelectCommand"/> ! /// </summary> public IDbCommand SelectCommand { *************** *** 231,235 **** } } ! public IDbCommand DeleteCommand { --- 336,342 ---- } } ! /// <summary> ! /// <see cref="IDbDataAdapter.DeleteCommand"/> ! /// </summary> public IDbCommand DeleteCommand { *************** *** 243,247 **** } } ! public IDbCommand InsertCommand { --- 350,356 ---- } } ! /// <summary> ! /// <see cref="IDbDataAdapter.InsertCommand"/> ! /// </summary> public IDbCommand InsertCommand { *************** *** 255,259 **** } } - #endregion --- 364,367 ---- *************** *** 264,268 **** #region IVerifiable Members ! public bool IsVerified { --- 372,378 ---- #region IVerifiable Members ! /// <summary> ! /// <see cref="IVerifiable.IsVerified"/> ! /// </summary> public bool IsVerified { *************** *** 272,276 **** } } - #endregion } --- 382,385 ---- |