Commit Graph
22 Commits
Author SHA1 Message Date
Tom Philpot dbee33d41c Add tests for AppSettingsSection. 2014-05-05 08:18:02 -07:00
Martin Baulig 0b57238424 [System.Configuration]: SaveMode and UserLevel.
* Configuration.Save() and SaveAs() now honors the
  `ConfigurationSaveMode' argument.

* Check whether the file has been modified prior to saving.

* Fix ConfigurationUserLevel inheritance.

* Implement ConfigurationElement.IsModified().

* New ConfigurationSaveTest.cs test:

  - load a custom section using different parent configuration
    files using ExeConfigurationFileMap and different
    ConfigurationUserLevel values.

  - save configuration using different ConfigurationSaveMode
    arguments and different inherited parent configurations.

* ExeConfigurationFileMapTest.cs: Add error checks for missing
  required filenames.

* New TestUtil.cs helper class:

  - RunWithTempFile() and RunWithTempFiles() helper functions.
  - DotNetVersion, ThisDllName and ThisConfigFileName properties,
    moving all the #ifdef's into one central place.
2012-12-21 10:20:18 +01:00
Gonzalo Paniagua Javier 72090fea58 2009-07-17 Gonzalo Paniagua Javier <[email protected]>
* ConfigurationElement.cs: don't skip xml nodes when reading 2
	ConfigurationElement in a row. Patch by Greg Smolyn that fixes bug
	#521231.


svn path=/trunk/mcs/; revision=138142
2009-07-17 17:58:53 +00:00
Gert Driesen 4323fbeaeb Moved ProviderCollectionTest.cs from System assembly to System.Configuration.
svn path=/trunk/mcs/; revision=112950
2008-09-14 12:17:43 +00:00
Gert Driesen 590868c044 * ConfigurationErrorsExceptionTest.cs: Added tests for ctors and
GetFilename/GetLineNumber overloads.
* System.Configuration_test.dll.sources: added
ConfigurationErrorsExceptionTest.cs.
* System.Configuration.dll.sources: added ConfigXmlTextReader.cs.
* ConfigurationElement.cs: Use ConfigurationErrorsException instead of
ConfigurationException, and pass reader to ConfigurationErrorsException
ctor to allow for file/linenumber info in exception message.
* ConfigurationErrorsException.cs: Removed local bareMessage field, and
use base.BareMessage field instead. Fixed Message property to only add
filename if not null or zero-length string, and only add line if not
zero. In GetFilename/GetLineNumber overloads, only try to get info if
node/reader implements IConfigErrorInfo.
* ConfigurationSection.cs: Use ConfigXmlTextReader instead of
XmlTextReader to allow for file/linenumber info in exception messages.
* ConfigXmlTextReader.cs: Added XmlTextReader that implements 
IConfigErrorInfo.
* ConfigurationLocation.cs: Use ConfigXmlTextReader instead of
XmlTextReader to allow for file/linenumber info in exception messages.
* ClientConfigurationSystem.cs: Perform lazy initialization and
wrap exceptions in ConfigurationErrorsException. Fixes standalone test
t28.
* Configuration.cs: Use ConfigXmlTextReader instead of XmlTextReader
to allow for file/linenumber info in exception messages.
* ConfigInfo.cs: Fixed ThrowException to use file/number info available
in XmlTextReader for exception message.
* AppSettingsSection.cs: Use ConfigXmlTextReader instead of
XmlTextReader to allow for file/linenumber info in exception messages.
* Assert.cs: added.
* Makefile: added Assert.cs, and explicitly specify output file.
* t28.cs: Improved test.

svn path=/trunk/mcs/; revision=106626
2008-06-26 10:31:07 +00:00
Gert Driesen 1a52c9eadd * System.Configuration_test.dll.sources: added ProviderBaseTest.cs.
* ProviderBaseTest.cs: Added tests for Initialize.
* ProviderBase.cs: Remove "description" key from NameValueCollection.
Use provider name as description if description is null or a zero
length string. Modifies exception messages to match MS.
* GenericEnumConverterTest.cs: Remove unused variable.
* ConfigurationManagerTest.cs: Fixed line endings.
* ConnectionStringSettingsTest.cs: Fixed line endings and avoid
ToString override warning.
* KeyValueConfigurationElementTest.cs: Fixed line endings.
* KeyValueConfigurationCollectionTest.cs: Fixed line endings.

svn path=/trunk/mcs/; revision=85126
2007-08-31 14:15:07 +00:00
Atsushi Eno b0c24508c7 2007-06-13 Atsushi Enomoto <[email protected]>
* ConfigurationSectionGroup.cs
	  Configuration.cs : ConfigurationSectionGroup must be initialized
	  at least when being added to a collection.

	* ConfigurationSectionGroupTest.cs : new (my change is with tests.)

	* System.Configuration_test.dll.sources :
	  added ConfigurationSectionGroupTest.cs.


svn path=/trunk/mcs/; revision=79445
2007-06-13 16:14:09 +00:00
Konstantin Triger af2c502418 Delegate parameter checking and default assigning to Configuratin property.
Ensure the TypeConvert and Validator always exist.
Ensure the primitive types are properly initialized.

svn path=/trunk/mcs/; revision=69273
2006-12-10 12:58:44 +00:00
Chris Toshok c1232dd8f8 add new test
svn path=/trunk/mcs/; revision=55261
2006-01-09 21:19:32 +00:00
Chris Toshok afc4da9d07 2005-12-02 Chris Toshok <[email protected]>
* System.Configuration/ConnectionStringSettingsTest.cs: new tests.
	we fail a couple, due to the fact that it seems StringValidator on
	MS (at least in this case) doesn't actually check the MinLength
	requirement when the value is null.  I'm a bit confused by this.

	* System.Configuration/StringValidatorTest.cs: add a null
	validation check.


svn path=/trunk/mcs/; revision=53867
2005-12-03 01:39:12 +00:00
Chris Toshok 598e4e9d54 add new files to the build
svn path=/trunk/mcs/; revision=53028
2005-11-14 18:36:19 +00:00
Chris Toshok 354faad0ce add InfiniteTimeSpanConverter{Test}
svn path=/trunk/mcs/; revision=52225
2005-10-26 02:14:41 +00:00
Chris Toshok 10725b2655 add InfiniteIntConverter{Test}.cs
svn path=/trunk/mcs/; revision=52222
2005-10-26 01:24:56 +00:00
Chris Toshok c82cfdf745 add GenericEnumConverter + test
svn path=/trunk/mcs/; revision=52218
2005-10-25 23:10:28 +00:00
Chris Toshok 5b2f65caeb add positive time span validator
svn path=/trunk/mcs/; revision=52168
2005-10-25 04:13:55 +00:00
Chris Toshok a8317f5d6a add the TimeSpanSecondsOrInfiniteConverter stuff
svn path=/trunk/mcs/; revision=52165
2005-10-25 03:48:25 +00:00
Chris Toshok 2a9222f76a add TypeNameConverter{Test}.cs
svn path=/trunk/mcs/; revision=52157
2005-10-24 22:38:25 +00:00
Chris Toshok 43af9b688e 2005-10-24 Chris Toshok <[email protected]>
* System.Configuration_test.dll.sources: add
	WhiteSpaceTrimStringConverterTest.cs

	* System.Configuration.dll.sources: add
	WhiteSpaceTrimStringConverter.cs


svn path=/trunk/mcs/; revision=52153
2005-10-24 21:51:22 +00:00
Chris Toshok ffc20c2da0 2005-10-06 Chris Toshok <[email protected]>
* System.Configuration_test.dll.sources: add the
	KeyValueConfiguration*Test.cs files.


svn path=/trunk/mcs/; revision=51388
2005-10-07 03:20:30 +00:00
Chris Toshok 6d3bc0fff3 2005-10-05 Chris Toshok <[email protected]>
* System.Configuration_test.dll.sources: add a bunch of new tests.

	* System.Configuration.dll.sources: add a bunch of new files to
	the build.


svn path=/trunk/mcs/; revision=51312
2005-10-05 22:36:48 +00:00
Chris Toshok 4fe563db06 Add TimeSpanValidatorTest.cs
svn path=/trunk/mcs/; revision=50505
2005-09-22 16:42:57 +00:00
Chris Toshok 129d7b2b83 2005-09-22 Chris Toshok <[email protected]>
* System.Configuration_test.dll.sources: new file.


svn path=/trunk/mcs/; revision=50502
2005-09-22 16:13:09 +00:00