Commit Graph
626 Commits
Author SHA1 Message Date
Arina Itkes d94f62e963 Added test for exporting of a generated typed DataSet and DataTable by a same XmlExporter.
svn path=/trunk/mcs/; revision=94671
2008-02-03 10:24:49 +00:00
Arina Itkes a887f826b3 Added test for exporting of a generated typed DataSet and DataTable by a same XmlExporter.
svn path=/trunk/mcs/; revision=94669
2008-02-03 10:19:59 +00:00
Arina Itkes deed4ae382 New DataTable tests added to the project.
svn path=/trunk/mcs/; revision=94236
2008-01-29 09:07:54 +00:00
Arina Itkes 215fb97725 Fix for IXmlSerializable.WriteXml in DataTable class. (Bug 8905)
svn path=/trunk/mcs/; revision=94235
2008-01-29 09:02:25 +00:00
Konstantin Triger 3b37dd78d0 when rh expresssion is null or DBNull always return false
svn path=/trunk/mcs/; revision=93637
2008-01-23 10:27:43 +00:00
Veerapuram Varadhan 2d021cadf4 Tests for 2.0 GetDeleteCommand, GetUpdateCommand and GetInsertCommand
APIs


svn path=/trunk/mcs/; revision=93013
2008-01-16 06:08:48 +00:00
Konstantin Triger 14ca20dbb8 add support for string concat (+)
svn path=/trunk/mcs/; revision=91856
2007-12-24 12:59:33 +00:00
Konstantin Triger 3df125923f update the project file
svn path=/trunk/mcs/; revision=89965
2007-11-20 07:16:43 +00:00
Atsushi Eno 7aa29313ee 2007-11-14 Atushi Enomoto <[email protected]>
* DataSetTest.cs : added test for r89307 fix (it is for XmlSerializer
	  but needs to be in sys.data).
	* MonkeyDataSet.cs : test support classes (generated by xsd).

	* System.Data_test.dll.sources: added MonkeyDataSet.cs, test helper.


svn path=/trunk/mcs/; revision=89596
2007-11-14 08:10:43 +00:00
Gert Driesen c231373769 * DataColumn.cs: Fixed ParamName of ArgumentNullException. Modified
exception message for invalid DateTimeMode value to match MS. Code
formatting.
* DbDataPermissionAttribute.cs: In KeyRestrictionBehavior, reuse
ExceptionHelper.CheckEnumValue.   
* ExceptionHelper.cs: Use same exception message for both 1.0 and 2.0.
* Index.cs: Fixed compiler warnings. Code formatting.
* SqlCommand.cs: Use ExceptionHelper.CheckEnumValue for enum checks.
* OleDbCommand.cs: Use ExceptionHelper.CheckEnumValue for enum checks.
* DBDataPermissionAttributeTest.cs: Improved test for invalid
KeyRestrictionBehavior. Fixed line endings.
* DataColumnTest.cs: No longer derive from deprecated Assertion class.
Code formatting. Added test for DateTimeMode.

svn path=/trunk/mcs/; revision=87866
2007-10-21 13:26:43 +00:00
Gert Driesen 3930b4b9cf * System.Data_test.dll.sources: Added DbDataAdapterTest.cs,
OdbcCommandTest.cs, OdbcConnectionTest.cs, OdbcDataAdapterTest.cs, 
OleDbCommandTest.cs, OleDbConnectionTest.cs, OleDbDataAdapterTest.cs, 
SqlDataAdapterTest.cs.
* DbDataAdapter.cs: Implemented UpdateBatchSize setter.
* DataAdapter.cs: In FillLoadOption setter, ensure value is valid.
Modified MissingMappingAction and MissingSchemaAction setters to use
ExceptionHelper.CheckEnumValue to validate value. Spaces to tabs and
code formatting.
* ExceptionHelper.cs: Added CheckEnumValue method and modified
InvalidEnumValueException method to return AORE on 2.0 profile. Added
ConnectionClosed method that returns an InvalidOperationException.
* OleDbDataAdapter.cs: In default ctor, set SelectCommand to null.
Only initialize SelectCommand in ctors. Use direct assignment in
IDbDataAdapter implementation.
* OleDbCommand.cs: Added constant for default CommandTimeout, instead
of using a magic number. Avoid unnecessary initialization. Fixed
default value for DesignTimeVisible. Return zero-length string if
CommandText is null. Added implementation for UpdatedRowSource.
* OleDbConnection.cs: Moved initialization of gda to Open ().
Avoid unnecessary initialization. Return zero-length string if
ConnectionString is null. If getters to Database, DataSource and
Provider return zero-length string if the connection is closed.
In ServerVersion, BeginTransaction and GetSchema, throw an
InvalidOperationException if connection is closed.
* OdbcCommand.cs: Added constant for default CommandTimeout, instead
of using a magic number. Avoid unnecessary initialization. Fixed
default value for DesignTimeVisible. Return zero-length string if
CommandText is null. Spaces to tabs and code formatting.
* OdbcError.cs: Fixed typo in exception message.
* OdbcConnection.cs: Return zero-length string if ConnectionString is
null. In getters for Database, DataSource and Driver return a
zero-length string if connection is closed. In BeginTransaction and
GetSchema throw InvalidOperationException if connection is closed.
Added override for GetSchema (string, string []). Use string.Empty
instead of "".
* OdbcDataAdapter.cs: Avoid unnecessary initializations. Use direct
assignment in IDbDataAdapter implementation. In default ctor, set
SelectCommand to null.
* SqlCommand.cs: Added constant for default CommandTimeout, instead
of using a magic number. Avoid unnecessary initialization. Fixed
default value for DesignTimeVisible. Return zero-length string if
CommandText is null. Use ExceptionHelper.InvalidEnumValueException
to avoid code duplication. Spaces to tabs and code formatting.
* SqlConnection.cs: Use different default package size on 2.0 profile.
Added constants for default values, instead of using magic numbers.
Avoid unnecessary initialization. In PacketSize, return default or
configured packet size when connection is not open. Use 
ExceptionHelper.ConnectionClosed instead of local method. Removed   
use of some hardcoded values in SetDefaultConnectionParameters, and
use Environment.MachineName as default WorkstationId instead of 
DNS host name. Code formatting.
* SqlDataAdapter.cs: In default ctor, set SelectCommand to null.
Avoid unnecessary initializations. Use direct assignment in   
IDbDataAdapter implementation. Fixed exception message for negative
UpdateBatchSize. In Dispose override, make sure to invoke base
method.
* DbDataAdapterTest.cs: Added test for UpdateBatchSize.
* DataAdapterTest.cs: Added tests for AcceptChangesDuringFile,   
AcceptChangesDuringUpdate, ContinueUpdateOnError, FillLoadOption,
MissingMappingAction, MissingSchemaAction and                      
ReturnProviderSpecificTypes.
* OdbcDataAdapterTest.cs: Added tests for ctors, DeleteCommand,
InsertCommand, SelectCommand, UpdateCommand and Dispose.
* OdbcDataReaderTest.cs: fixed line endings.
* OdbcCommandTest.cs: Added tests for ctors and CommantText.
* OdbcConnectionTest.cs: Removed original test that relied on MySQL.
Added ctor tests. Added tests for BeginTransaction, GetSchema and 
ServerVersion with connection that is closed.
* OleDbDataAdapterTest.cs: Added tests for ctors, DeleteCommand, 
InsertCommand, SelectCommand, UpdateCommand and Dispose.
* OleDbCommandTest.cs: Added tests for ctors and CommandText.
* OleDbConnectionTest.cs: Added tests for ctors and ConnectionString. 
Added tests for BeginTransaction, GetSchema and ServerVersion with connection that is closed.
* SqlCommandTest.cs: Added tests for ctors and CommantText. 
* SqlConnectionTest.cs: Added tests for ctors, ConnectionString and 
ServerVersion.
* SqlDataAdapterTest.cs: Added tests for ctors, DeleteCommand,
InsertCommand, SelectCommand, UpdateCommand, UpdateBatchSize and 
Dispose.

svn path=/trunk/mcs/; revision=87859
2007-10-20 23:16:52 +00:00
Gert Driesen 9605b0fd6c * DbTransactionTest.cs: Enabled test for bug #325397.
svn path=/trunk/mcs/; revision=87837
2007-10-19 17:15:32 +00:00
Nagappan Alagappan f7f96709b4 2007-10-19 Nagappan A <[email protected]>
* OdbcDataReaderTest.cs (Bug332404Test): Bug 332404 - ODBC and
	  numeric columns. Thanks to Ernesto Carrea <[email protected]>
	  for the patch and the test case.
	  Fixed compilation issues in Bug332400Test method.


svn path=/trunk/mcs/; revision=87823
2007-10-19 11:50:27 +00:00
Nagappan Alagappan 831403d104 2007-10-19 Nagappan A <[email protected]>
* SqlCommandBuilderTest.cs: Fixed compilation warnings.


svn path=/trunk/mcs/; revision=87822
2007-10-19 11:49:41 +00:00
Gert Driesen 4ddc52b0cd * SqlConnectionTest.cs: Added tests for BeginTransaction and GetSchema
when connection is closed.

svn path=/trunk/mcs/; revision=87753
2007-10-18 14:30:29 +00:00
Gert Driesen 720e9720a7 * DbTransactionTest.cs: Added test for bug #325397.
svn path=/trunk/mcs/; revision=87609
2007-10-16 18:23:21 +00:00
Nagappan Alagappan ab6b536454 2007-10-12 Nagappan A <[email protected]>
* OdbcDataReaderTest.cs (Bug332400Test): Bug 332400 - ODBC and
	  LONGBLOB columns. Thanks to Ernesto Carrea
	  <[email protected]> for the patch and the test case.


svn path=/trunk/mcs/; revision=87372
2007-10-12 08:29:44 +00:00
Joel Reed 22f03a9378 enhance parsing of Mono.Data.SqlExpressions's SUBSTRING and IIF
svn path=/trunk/mcs/; revision=86725
2007-10-01 21:00:51 +00:00
Veerapuram Varadhan 129c32f749 New tests for Read and Write APIs.
svn path=/trunk/mcs/; revision=86720
2007-10-01 18:43:20 +00:00
Konstantin Triger f181229280 fix the test for net_1_1 profile
svn path=/trunk/mcs/; revision=86657
2007-09-30 07:38:35 +00:00
Veerapuram Varadhan 867ca0395b Change the test strings to represent the fixes for GetXsdType()
implementation. 


svn path=/trunk/mcs/; revision=86493
2007-09-27 13:09:58 +00:00
Konstantin Triger 666702e2e3 correct WriteAttributeString while writing xml with XmlWriteMode.WriteSchema
svn path=/trunk/mcs/; revision=86326
2007-09-25 14:31:17 +00:00
Veerapuram Varadhan 213b86c324 ReadWriteXmlTest - New Tests - for Read/WriteXml API tests.
svn path=/trunk/mcs/; revision=86309
2007-09-25 11:17:43 +00:00
Nagappan Alagappan 9118259f09 2007-09-11 Nagappan A <[email protected]>
* OdbcCommandBuilderTest.cs (DefaultPropertiesTest): QuotePrefix
	and QuoteSuffix are not supported in 2.0 profile, so moved them
	under 1.0 profile.

	* OdbcDataReaderTest.cs (Bug82560Test): Added new test case for
	the bug # 82560. Thanks to [email protected] (amc) for providing
	this test case.
	(Bug82135Test): Fixed connection open.


svn path=/trunk/mcs/; revision=85620
2007-09-11 06:55:41 +00:00
Nagappan Alagappan d06f4b4af9 2007-08-06 Nagappan A <[email protected]>
* DataTableTest.cs (Bug55978): In some cases this test case was
	failing with Invalid Date format. So modified the testcase to use
	invariant culture for DateTime.


svn path=/trunk/mcs/; revision=83519
2007-08-06 07:00:57 +00:00
Nagappan Alagappan f90d4f76a9 2007-07-31 Nagappan A <[email protected]>
* 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
2007-07-31 09:08:17 +00:00
Nagappan Alagappan 95a4616e2b 2007-07-31 Nagappan A <[email protected]>
* OdbcDataReaderTest.cs (Bug82135Test): ODBC SQLExecDirect
	error. Delete where no-data-found fails. Fixes bug # 82135.


svn path=/trunk/mcs/; revision=83056
2007-07-31 07:58:12 +00:00
Nagappan Alagappan b7d27da557 2007-07-31 Nagappan A <[email protected]>
* IDbCommandTest.cs (ExecuteScalarTest): SqlClient and Odbc
	ExecuteScalar returns diff object type. Since the test is common
	to both the environment, modified the test case to handle both.


svn path=/trunk/mcs/; revision=83050
2007-07-31 07:12:17 +00:00
Nagappan Alagappan e2624c9544 2007-07-31 Nagappan A <[email protected]>
* OdbcDataAdapterTest.cs (InsertUtf8Test): Thanks to
	[email protected] (amc) for providing this test case. Fixes bug #
	82191. ODBC command UTF8 error. SQL failed with UTF8 symbols in
	query.


svn path=/trunk/mcs/; revision=83049
2007-07-31 07:11:45 +00:00
Nagappan Alagappan 4114157db8 2007-07-26 Nagappan A <[email protected]>
* DataTableTest.cs (Bug82109): Should always parse the object of
	type DateTime in InvariantCulture CultureInfo, Fixes Bug # 82109.


svn path=/trunk/mcs/; revision=82767
2007-07-26 13:04:50 +00:00
Nagappan Alagappan e729424c16 2007-07-24 Nagappan A <[email protected]>
* SqlParameterTest.cs (ParameterSizeTest): Fixes Large strings
	truncated with SqlClient - Bug # 82170.


svn path=/trunk/mcs/; revision=82531
2007-07-24 06:42:24 +00:00
Nagappan Alagappan 80d6bc57b6 2007-07-22 Nagappan A <[email protected]>
* SqlTransactionTest.cs: Added exception handling.


svn path=/trunk/mcs/; revision=82423
2007-07-22 06:43:35 +00:00
Nagappan Alagappan 5d639faa6a 2007-06-21 Nagappan A <[email protected]>
* System.Data.Connected.Tests.dll.sources: Added
	System.Data.Odbc/OdbcConnectionStringBuilderTest.cs.


svn path=/trunk/mcs/; revision=80464
2007-06-21 13:06:51 +00:00
Nagappan Alagappan 037ceabc25 2007-06-21 Nagappan A <[email protected]>
* OdbcConnectionStringBuilderTest.cs: Added base test-cases from
	Nidhi Rawal ([email protected]).

	* OdbcParameterTest.cs (ImageParameterTest, NTextParameterTest)
	(TextParameterTest): Fixed mysql syntax used.


svn path=/trunk/mcs/; revision=80463
2007-06-21 13:05:26 +00:00
Nagappan Alagappan 8222dfe9b4 2007-06-21 Nagappan A <[email protected]>
* SqlBooleanTest.cs (EqualityOperator): Fixed compiler warnings.
	(InequalityOperator): Fixed compiler warnings.


svn path=/trunk/mcs/; revision=80456
2007-06-21 12:56:31 +00:00
Nagappan Alagappan f353114fc6 2007-06-21 Nagappan A <[email protected]>
* OdbcDataReaderTest.cs (FindZeroInToStringTest): Test for varchar
	longer than 255 characters, by Mads Bondo Dydensborg <[email protected]>.


svn path=/trunk/mcs/; revision=80428
2007-06-21 10:03:00 +00:00
Nagappan Alagappan d4d1e6f922 2007-06-11 Nagappan A <[email protected]>
* DataReaderTest.cs (GetBytesNullBufferTest): Odbc returns -1, but
	SqlClient returns 0. Value has to be modified accordingly.


svn path=/trunk/mcs/; revision=79150
2007-06-11 06:06:17 +00:00
Nagappan Alagappan 2d5298e7f6 2007-06-11 Nagappan A <[email protected]>
* 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
2007-06-11 06:04:07 +00:00
Nagappan Alagappan eb5446830b 2007-06-08 Nagappan A <[email protected]>
* OdbcParameterTest.cs (OdbcTypeTest): The default data type of
	OdbcParameter is changed to NVarChar.


svn path=/trunk/mcs/; revision=78945
2007-06-08 12:28:57 +00:00
Nagappan Alagappan 3548ddadc6 2007-06-07 Nagappan A <[email protected]>
* DataReaderTest.cs (GetBytesNullBufferTest): Modified the
	expected value.


svn path=/trunk/mcs/; revision=78834
2007-06-07 13:09:36 +00:00
Nagappan Alagappan 9bb6ac4a14 2007-06-07 Amit Biswas <[email protected]>
* OdbcDataReaderTest.cs (GetDataTypeNameTest): Test case to check the returned data type names
	(GetDataTypeNameIndexOutOfRangeExceptionTest): Test for out of range exceptions
	(GetOrdinalTest): Test case for returned ordinals
	(GetOrdinalIndexOutOfRangeExceptionTest): Testing out of range index values
	(GetFieldTypeTest): Test case for checking returned field types
	(GetFieldTypeIndexOutOfRangeExceptionTest): Test case for checking out of range index values
	(GetNameTest): Test for returned name 
	(GetNameIndexOutOfRangeExceptionTest): Test for out of range index values
		
	* OdbcParameterTest.cs (DefaultValuesTest): Test for default OdbcParameter values
	
	* OdbcParameterCollectionTest.cs (InsertTest): Test for inserting parameters in parameter collection
	(InsertNoOverwriteTest): Testing overwriting in Insert
	(InsertNullTest): Testing insert for null values
	(InsertEmptyTest): Testing insert for empty values
	(InsertAlreadyContainedParameterTest): Test for existing parameters
	(InsertArgumentGreaterThanCountTest): Testing out of range index values
	(InsertNegativeArgumentTest): Test for negative arguments
	(InsertNonOdbcParameterTest): Test to insert non Odbc Parameter values
	(AddRangeTest): Test for adding a range of values to the parameter collection	
	(AddRangeParameterAlreadyContainedTest): Test for adding already contained parameters
	(AddRangeArgumentNullExceptionTest): Test for null arguments
	(AddRangeParameterContainedInAnotherCollTest): Adding range of parameters contained in another collection
	(AddRangeMultiDimensionalArrayTest): Test for checking support of multi-dimensional arrays
	(AddRangeArrayValuesArgumentNullExceptionTest):  Test for null arguments in array values
	(ContainsTest): Test for Contains
	(ContainsNonOdbcParameterTest): Testing Contains for non-OdbcParameters
	(ContainsCaseSensitivityTest) : Test for case sensitivity
	(ContainsNotMineTest) : Testing Contains for parameters belonging to another collection
	(IndexOfCaseSensitivityTest): Testing case sensitivity for IndexOf
	(IndexOfNonOdbcParameterTest): Testing IndexOf for non-OdbcParameters
	(CopyToTest): Test for CopyTo method
	(CopyToArgumentExceptionTest):  Testing for invalid arguments
	(CopyToMultiDimensionalArrayTest): Testing CopyTo for multi-dimensional arrays
	(CopyToLowerBoundCheckTest):  Testing invalid index values
	(DuplicateParameterNameTest): Testing support for duplicate parameter names
	(RemoveTest): Test for Remove (OdbcParameter)	
	(RemoveNullTest): Testing Remove for null values
	(RemoveEmptyTest): Testing Remove for empty values
	(RemoveNonOdbcParameterTest): Testing Remove for non Odbc Parameters
	(RemoveNonExistingParameterTest): Testing Remove for non existing Parameters
	(RemoveParameterContainedInAnotherCollTest): Removing parameters contained in another collection
	(RemoveAtTest): Test for RemoveAt
	(RemoveAtOutOfRangeIndexTest): Testing RemoveAt with invalid index
	(RemoveAtNegativeIndexTest): Test for negative index
	(RemoveAtBoundaryTest): Boundary check for RemoveAt
	(AddWithValueTest): Testing AddWithValue with various parameters
	(DefaultNamesAndValuesTest): Testing default names and values of parameters


svn path=/trunk/mcs/; revision=78833
2007-06-07 13:07:56 +00:00
Nagappan Alagappan 90182882da 2007-06-07 Nagappan A <[email protected]>
* SqlCommandTest.cs: Fixes compilation warnings.


svn path=/trunk/mcs/; revision=78832
2007-06-07 13:06:31 +00:00
Nagappan Alagappan db8ea6e71f 2007-06-06 Nagappan A <[email protected]>
* MySQL_5.sql: Fixed EOL and extra spaces.


svn path=/trunk/mcs/; revision=78729
2007-06-06 12:18:56 +00:00
Nagappan Alagappan 01ca77c113 2007-06-06 Nagappan A <[email protected]>
* MySQL_5.sql: Added more sql statements.


svn path=/trunk/mcs/; revision=78725
2007-06-06 11:50:35 +00:00
Nagappan Alagappan f45f8a7c85 2007-06-06 Nagappan A <[email protected]>
* DataColumnExpressionTest.cs (DataColumnCharTest): Test case to
	check if the data column of type char. Bug # 81625.


svn path=/trunk/mcs/; revision=78718
2007-06-06 10:40:14 +00:00
Nagappan Alagappan 7903207616 2007-05-30 Nagappan A <[email protected]>
* 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
2007-05-30 11:02:36 +00:00
Nagappan Alagappan 754339e7c3 2007-05-30 Nagappan A <[email protected]>
* sqlserver.sql: Fixed sqlserver sql statements and its respective
	values.


svn path=/trunk/mcs/; revision=78188
2007-05-30 10:59:08 +00:00
Nagappan Alagappan 48c392c9a8 2007-05-30 Nagappan A <[email protected]>
* DBHelper.cs: Fixed warnings of unused variables.


svn path=/trunk/mcs/; revision=78187
2007-05-30 10:57:48 +00:00
Gert Driesen 45e8c741c0 * SqlCommandTest.cs: Added test for bug #81710.
* System.Data_test.dll.sources: Added SqlCommandTest.cs.

svn path=/trunk/mcs/; revision=78147
2007-05-29 18:01:40 +00:00
Chris Toshok 52c3b98acc In Test/System.Data:
2007-05-18  Chris Toshok  <[email protected]>

	* DataViewTest.cs (DefaultColumnNameAddListChangedTest): new test
	for figuring out the sorts of events raised between 1.1 and 2.0
	when you add a column with the default name.

In System.Data:
2007-05-18  Chris Toshok  <[email protected]>

	* DataColumnCollection.cs (Add ()): handle the default name case
	in Add(DataColumn).
	(Add (string)): same - let Add(DataColumn) handle the default name
	setting.
	(Add (DataColumn)): in the 1.1 case, we need to add the column's
	PropertyChanged handler *before* possibly setting the column name
	to the default so we emit the right events (Changed/Added).  In
	the 2.0 case, we add the event handler after the name is set, and
	therefore only emit the Added event.


svn path=/trunk/mcs/; revision=77738
2007-05-21 04:57:02 +00:00