** Fixes#561667
* SqlCommand.cs (Dispose): While Disposing, set connection's
datareader to null so the connection can be reused with another datareader.
* SqlCommandTest.cs: Fixes for SQL Server 7.0 / TDS 7.
* SqlConnectionTest.cs: Fixes for SQL Server 7.0 / TDS 7.
* SqlDataAdapterTest.cs: Added tests for Update. Fixed Fill_Test_Data,
Fill_Test_PriKey and Fill_Test_FillErrorTest to pass on SQL Server 7.0.
Avoid catching and rethrowing AssertionException. Minor improvements.
* SqlParameterTest.cs: Fixes for SQL Server 7.0 / TDS 7. Updated
ZeroLengthString to pass on 1.0 profile.
* SqlTransactionTest.cs: Fixes for SQL Server 7.0 / TDS 7.
svn path=/trunk/mcs/; revision=139242
conversion if type of value is different from "system type". Make
DbTypeMapping hashtable available on 1.0 profile, and add missing
mappings. Wrap FormatException adding information on conversion
that failed.
* SqlParameterTest.cs: Added test for bug #526794, and failed
conversion from (zero-length) string to int. Changed spaces to tabs.
svn path=/trunk/mcs/; revision=139116
CloseConnection behavior.
* SqlCommand.cs: Ensure connection is closed if CloseConnection
behavior is set, and reader could not be created.
svn path=/trunk/mcs/; revision=138854
* SqlCommandTest.cs: Fixed warning.
* SqlConnectionTest.cs: Removed unused property.
* SqlDataReaderTest.cs: Enabled GetChars test on 1.0
profile. Added GetValues test. Added and improved
GetSqlValue tests. Improved HasRows and NextResult
tests. Added GetFieldType tests. Added big batch of
schema-related tests.
* SqlParameterTest.cs: Moved disconnected tests to
System.Data test suite. Improved test for bug
#382635. Added test for failed conversion to SQL type.
svn path=/trunk/mcs/; revision=122382
providerTests section.
* app-net_2.0.config: Added providerTests section and removed
mono.data section.
* Makefile: Added support for CONNECTION variable and corresponding
PROVIDER_TESTS_CONNECTION environment variable. Always rebuild test
assembly since we have no dependency check for sources in place.
Only add reference to Mono.Data on 1.1 profile. Added reference to
System.Configuration on 2.0 profile.
* sqlserver.config: Merged into app-*.config.
* odbc.config: Merged into app-*.config.
* System.Data.Connected.Tests.dll.sources: Added ConnectionConfig.cs,
EngineConfig.cs, EngineType.cs, ProviderTestsConfigurationHandler.cs
and DbDataReaderTest.cs. Removed OdbcConnectionStringBuilderTest.cs.
* ConnectionConfig.cs: Holds information on a specific connection and
corresponding engine to test.
* EngineConfig.cs: Holds information on the capabilities and behavior
of an RDBMS engine.
* EngineType.cs: Defines different database engines supported by the
provider tests.
* ConnectionManager.cs: Use DbProviderFactory and DbConnection
on 2.0 profile. Added support for new Connection/Engine configuration.
* ProviderTestsConfigurationHandler.cs: IConfigurationSectionHandler
for the ProviderTests section.
* DataReaderTest.cs: Added tests that were previously part of
SqlClient tests but apply to all families. Improved existing
tests.
* DbDataReaderTest.cs: Added GetProviderSpecificValues error check
tests.
* IDbCommandTest.cs: Added ExecuteNonQuery tests for empty CommandText.
Added test for bug #462947.
* OdbcCommandBuilderTest.cs: Improved GetDeleteCommand,
GetInsertCommand and GetUpdateCommand tests. Added QuotePrefix,
QuoteSuffix and QuoteIdentifier tests.
* OdbcCommandTest.cs: Improved existing tests. Added
ExecuteNonQuery and Dispose tests.
* OdbcConnectionStringBuilderTest.cs: Moved to System.Data
test suite.
* OdbcDataAdapterTest.cs: Removed extra whitespace.
* OdbcDataReaderTest.cs: Added GetBytes and GetSchemaTable
tests.
* OdbcParameterCollectionTest.cs: Improve existing tests.
* OdbcParameterTest.cs: Added tests for several data types.
* SqlCommandBuilderTest.cs: Improve Get*Command tests.
* SqlCommandTest.cs: Added test for bug #341743. Added test
for connection state after executing invalid SQL. Improved
stored procedure test to check behavior with and without
leading '@' for parameter names. Minor formatting changes.
* SqlConnectionTest.cs: Split up connection string errors
test.
* SqlDataReaderTest.cs: Improved GetInt64Test. Improved and
added GetBytes tests. Added GetSqlValues and HasRows tests.
Added GetSchemaTable test. Improved GetProviderSpecificFieldType
tests.
* SqlParameterTest.cs: Improved ParameterType test. Added
type inferrence tests.
* SqlTransactionTest.cs: Allow not working tests to run on MS.
* MySQL_5.sql: Added numeric and decimal colums with different
precision and scale. Added more rows to binary_family. Added
nchar and nvarchar columns to string_family, and added extra
data. Added time and date columns to datetime_family.
* sqlserver.sql: Added numeric and decimal colums with different
precision and scale. Added timestamp column and more rows to
binary_family. Added nchar and nvarchar columns to string_family,
and added extra data. Added sp_326182 stored procedure.
* sybase.sql: Added more rows to binary_family.
svn path=/trunk/mcs/; revision=122297
overload that can be used to retrieve an existing connection pool.
Modified ResetConnectionPool () to skip free slots in the pool and to
close pooled connections that are not in use. Pooled connections that
are in use are now marked as non-pooled so that they are no longer
returned to the pool when they are closed. Fixes bug #443131.
* SqlConnection.cs: In Close, also remove reference to pool. In Open,
set TdsConnection.Pooling to false for a non-pooled connection.
Fixed ClearAllPools to no longer create a new connection for each
pool. In ClearPool, perform a lookup of the pool to clear using
the connectionstring as the pool field may refer to another pool
(as the connectionstring may have changed).
* SqlConnectionTest.cs: Added tests for ClearPool and ClearAllPools.
svn path=/trunk/mcs/; revision=118308
* SqlCommand.cs (ExecuteReader): When behavior includes SingleRow,
then only return a single result. Fixes bug #412569.
svn path=/trunk/mcs/; revision=109065
CommandTimeout to match MS. On 2.0 profile, throw NRE in Prepare
when connection is NULL. In Prepare, return immediately after
connection check (2.0 only) for stored procedures, or when no
parameters are added. Added check to see if transaction is
associated with same connection as the command and updated
exception messages.
* SqlCommandTest.cs: Enabled CommandTimeout test. Enabled test for
Prepare with NULL connection. Enabled test for bug #412586.
* SqlCommandTest.cs: Enabled and improved tests for pending transaction
and transaction that is not associated with connection. Added tests for
Prepare.
svn path=/trunk/mcs/; revision=109058
whether an async method is being executed. Minor changes to exception
messages to match MS.
* SqlCommandTest.cs: Enabled and improved tests for Execute* with closed
connection.
* SqlCommandTest.cs: Enabled and improved tests for Execute* with only a
transaction set.
svn path=/trunk/mcs/; revision=109043
Transaction to be set when a reader is open for the current connection.
Fixes bug #412579.
* SqlCommandTest.cs: Enabled test for bug #412579.
svn path=/trunk/mcs/; revision=109021
if transaction is in progress. Fixes bug #412576. On 1.0 profile, throw
InvalidOperationException when a reader is open for the current
connection. Do not set transaction to NULL when changing connection,
instead set it to null in Transaction when transaction is no longer
open.
* SqlCommandTest.cs: Enabled and improved test for bug #412576.
Enabled test for changing Connection while reader is open.
svn path=/trunk/mcs/; revision=109018
field. Remove Init method, as initialization is done in
SetDefaultConnectionParameters. Initialize parms in
SetDefaultConnectionParameters to avoid calling Reset on newly
initialized collection. In Dispose (bool), also invoke base.Dispose if
SqlConnection was already disposed. Fixes bug #412571.
* SqlConnectionTest.cs: Enabled and improved test for bug #412571.
svn path=/trunk/mcs/; revision=109013
equals original state. Fixes bug #412574. Removed extra whitespace.
* SqlConnectionTest.cs: Enabled test for bug #412574.
svn path=/trunk/mcs/; revision=109009
regular test suite. Improved existing tests, and added set of new
tests. Reduce failure count.
* SqlConnectionTest.cs: Moved tests that do not require connection to
regular test suite. Improved existing tests, and added set of new
tests. Reduce failure count.
* SqlTransactionTest.cs: Added several tests.
svn path=/trunk/mcs/; revision=108997
* SqlConnectionTest.cs (InterfaceTransactionTest): Fixes bug
82189. SqlConnection throws an exception if Connection or
Transaction is set to null on IDbCommand interface.
svn path=/trunk/mcs/; revision=83061
* SqlCommandTest.cs (SqlCommandDisposeTest): Added new test case
to check, the SqlCommand.Dispose, not to dispose SqlConnection and
SqlTransaction instances.
svn path=/trunk/mcs/; revision=79149
* SqlCommandTest.cs (StoredProc_NoParameterTest)
(StoredProc_ParameterTest, rpc_helper_function): Added new methods
to test the implementation of TDS RPC.
svn path=/trunk/mcs/; revision=78189
* SqlDataReaderTest.cs (GetSqlBytesTest): Test case for GetSqlBytes
(GetProviderSpecificFieldTypeTest): Test case for GetProviderSpecificFieldTypeTest
(GetProviderSpecificValueTest): Test case for GetProviderSpecificValueTest
(GetProviderSpecificValueLowerBoundaryTest):
(GetProviderSpecificValueUpperBoundaryTest):
(GetProviderSpecificValuesTest): Test case for GetProviderSpecificValuesTest
(GetProviderSpecificValuesSmallArrayTest): Test case with an array smaller than no. of columns
(GetProviderSpecificValuesLargeArrayTest): Test case with an array larger than no. of columns
(GetProviderSpecificValuesNullTest): Test case for null parameters
* SqlParameterTest.cs (XmlSchemaTest): Test case for properties related to XML schema
(SourceColumnNullMappingTest): Test case for SourceColumnNullMappingTest
(ctor7Test): Test case to the constructor new in .net 2.0
* SqlParameterTest.cs (ParameterType): Corrected a bug in the test case regarding
default values of SqlDbType and DbType
(SqlDbTypeTest): Test for SqlDbType and DbType properties
(ResetSqlDbTypeTest): Test for ResetSqlDbType method
(ResetDbTypeTest): Test for ResetDbType method
* SqlParameterCollectionTest.cs (CopyToTest): Test case for CopyTo method
svn path=/trunk/mcs/; revision=76656
* SqlCommandTest.cs (BeginExecuteXmlReaderTest): Written test case for the method
BeginExecuteXmlReader.
(BeginExecuteXmlReaderExceptionTest): Written test case for the method BeginExecuteXmlReader
to check for InvalidOperationException.
(CloneObjTest): Written test case for the method Clone.
* SqlConnectionTest.cs (ChangePasswordNullConnStringTest): Written test case for the method
ChangePassword to check for null connection string.
(ChangePasswordNullPasswordTest): Written test case for the method ChangePassword to check for
null new password.
(ChangePasswordEmptyPasswordTest): Written test case for the method ChangePassword to check for
password as empty string.
(ChangePasswordExceedPasswordTest): Written test case for the method ChangePassword to check
if the password exceeds its permitted size.
* SqlClientFactory.cs: Created the class.
(CreatePermissionTest): Added a test case for the method CreatePermission.
2007-03-20 Nidhi Rawal <[email protected]>
* SqlConnectionStringBuilderTest.cs: Fixed the bug by including the
category sqlserver, in the absence of which none of the test-cases
were executing.
(TrustServerCertificateTest): Written test-case for the property TrustServerCertificate.
(TypeSystemVersionTest): Written test-case for the property TypeSystemVersion.
(UserInstanceTest): Written test-case for the property UserInstance.
(SettingUserInstanceTest): Written test-case for checking the connection string after
assigning the value for keyword User Instance.
(ContextConnectionTest): Written test-case for the property ContextConnection.
(SettingContextConnectionTest): Written test-case for checking the connection string after
assigning the value for keyword Context Connection.
* SqlCommandTest.cs (NotificationTest): Written test-case for property Notification.
(NotificationAutoEnlistTest): Written the test-case for property NotificationAutoEnlist.
* SqlConnectionTest.cs (FireInfoMessageEventOnUserErrorsTest): Written
test-case for the property FireInfoMessageEventOnUserErrors.
(StatisticsEnabledTest): Written test-case for the property StatisticsEnabled.
* SqlDataAdapterTest.cs (UpdateBatchSizeTest): Written test-case for the
property UpdateBatchSize.
(UpdateBatchSizeArgumentOutOfRangeTest): Written test-case for the ArgumentOutOfRange
exception for UpdateBatchSize property.
2007-03-19 Nidhi Rawal <[email protected]>
* SqlParameterTest.cs (CompareInfoTest): Written the test case
for property CompareInfo.
(LocaleIdTest): Written the test case for property LocaleId.
(SqlValueTest): Written test case for property SqlValue.
svn path=/trunk/mcs/; revision=75190
* SqlParameter.cs: Move isVariableSizeType flag to TdsMetaParameter
so that the TdsMetaParameter can validate itself for valid size / values.
* SqlCommand.cs (Execute): Call Validate on TdsMetaParameter.
* TdsMetaParameter.cs: Add Validate() method. For now, validate
size/value. Add isVariableSizeType.
* SqlCommandTest.cs: Add OutputParamSizeTest1-4 to test size/value
validation exception.
svn path=/trunk/mcs/; revision=74500
* SqlCommandTest.cs (ExecuteScalarTest, ExecuteReaderTest)
(ExecuteReaderTest, PrepareTest, TransactionTest): Modified
expected exception to NullReferenceException as it has to be
thrown in 2.0 profile.
svn path=/trunk/mcs/; revision=74234
* SqlCommandTest.cs: Add new test to check string parameters with
value = null and size 0. Fixed tests for NET 2.0 (different exceptions
thrown)
* ConnectionManager.cs: small fix to close the connection if we
mean to change the connection string and open it again
svn path=/trunk/mcs/; revision=74000
* SqlCommand.cs (ExecuteScalar): Fix returned value for
stored procedure calls to return the first column of the
first row produced by the proc.
* SqlCommandTest.cs: Add parameterized stored procedure call tests
to ExecuteScalar and ExecuteNonQuery.
svn path=/trunk/mcs/; revision=73982
* SqlCommandBuilderTest.cs (GetInsertCommandTest)
(GetInsertCommandTestWithExpression, GetUpdateCommandTest): Fixed
NET 2.0 based test conditions.
(GetUpdateCommandBoolTest): Added new test case.
(GetUpdateCommandTest_CheckNonUpdatableColumns): Fixed NET 2.0
based test conditions.
(GetUpdateCommandBoolTest_CheckNonUpdatableColumns): Added new test
case.
(GetUpdateDeleteCommandBoolTest_CheckParameters): Added new test
case.
(GetUpdateCommandDBConcurrencyExceptionTest): Fixed NET 2.0 based
test conditions.
* SqlDataAdapterTest.cs: Commented not working test-cases.
svn path=/trunk/mcs/; revision=70623
* SqlDataAdapterTest.cs (SqlDataAdapterInheritTest): Implemented
new class to verify protected method of DbDataAdapter.
* Fixed existing test-cases to work with 2.0 profile.
svn path=/trunk/mcs/; revision=69820