Commit Graph
28 Commits
Author SHA1 Message Date
Marcos Henrich 7055704ed9 [System.Configuration] Test bad xml loading.
When ConfigurationManager.OpenMappedMachineConfiguration loads broken
xml ConfigurationErrorsException should be trown instead of
XmlException.
2016-02-15 12:27:44 +00:00
Alexander Köplinger 48e112d652 [Cleanup] Removed TARGET_JVM
It was once part of a special Java target profile, but this is no longer used today.
2014-08-08 03:28:34 +02:00
Andrés G. Aragoneses d4ed8a8e9e [System.Configuration/Test] Try to track down failure in buildbot
This TestConnectionStringRetrieval unit test (committed by me some months
ago) succeeds for me in a clean checkout, but I don't understand why it
fails in the buildbot, so let's place some sanity check in it.
2013-11-14 13:08:07 +01:00
Andres G. Aragoneses b0801115fc [Sys.Configuration] Remove a misleading MonoTODO in ConnectionStrings
The ConnectionStrings property of System.Configuration.ConfigurationManager
works perfectly, so this MonoTODO is not needed.

A unit test is also added to demonstrate that it's fully working and to
prevent it failing in the future.
2013-05-20 17:36:24 +01: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
Martin Baulig bb0721b63f [System.Configuration]: Imlement ConfigurationElement.EvaluationContext. 2012-11-21 02:03:20 +01:00
Martin Baulig 14ec9c7fb7 [System.Configuration]: Fix filenames in ExeConfigurationFileMap. 2012-11-21 02:03:03 +01:00
Martin Baulig 35fed1244f Fix ConfigurationManagerTest for .NET 4.0 and 4.5.
Use a new 'DotNetVersion' property rather than hardcoding 'net_2_0'.
2012-11-21 02:02:54 +01:00
Miguel de Icaza 477b011228 [System.Configuration] Disable broken test 2012-05-30 17:55:56 -04:00
Marek Safar 4bdd2d7170 Fix few unit tests 2012-03-15 14:06:46 +00:00
Michael Stoll 6bfc9f01db Added unit test for bug #3412 2012-02-12 18:08:49 +01:00
Jonathan Pobst 0df612b813 Reverse #elif check since 4.0 profile defines NET_2_0. Fixes broken test. 2010-12-17 10:30:52 -06:00
Jonathan Pobst 9bc4f0d82f Fix some broken tests that check for assembly version 2.0.0.0 on the 4.0 profile. 2010-12-16 22:19:30 -06:00
Gert Driesen c52dbbeb8b * ConfigurationManagerTest.cs: Added test for bug #323622.
svn path=/trunk/mcs/; revision=112960
2008-09-14 16:57:52 +00:00
Gert Driesen 42d71e4219 * ConfigurationManagerTest.cs: Added/improved tests for
OpenExeConfiguration. Enabled tests that were previously failed. 
* ClientConfigurationSystem.cs: Moved logic for defaulting to
configuration file of AppDomain to OpenExeConfigurationInternal.
* ConfigurationManager.cs (OpenExeConfigurationInternal):
Allow calling_assembly and exePath to be null. When userLevel is None,
default to configuration file of AppDomain if exePath is null or empty.
When exePath is specified, resolve it to absolute path and throw
ConfigurationErrorsException if exePath does not exist and add
.config extension to get config file name if exePath does exist.

svn path=/trunk/mcs/; revision=107080
2008-07-02 18:02:18 +00:00
Arina Itkes daa0a24c3e TARGET_JVM: replacing config file name to actual
svn path=/trunk/mcs/; revision=90154
2007-11-22 13:34:19 +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 94e85f4d14 2007-06-20 Atsushi Enomoto <[email protected]>
* ConfigurationManager.cs : in OpenExeConfiguration() and
	  OpenMappedExeConfiguration(), take userLevel into consideration.
	* InternalConfigurationHost.cs : consider ConfigurationUserLevel and
	  use correct config map file in InitForConfiguration().

	* ConfigurationManagerTest.cs : Enabled some tests with related to
	  roaming user config. Marked some tests for negative check as
	  [NotWorking] (they are rather uncovered bugs than enbug).


svn path=/trunk/mcs/; revision=80335
2007-06-20 16:26:15 +00:00
Atsushi Eno b0c6b96130 2007-04-17 Atsushi Enomoto <[email protected]>
* ConfigurationManagerTest.cs : added SectionCollectionEnumerator().
	  Fixed NotWorking test OpenMachineConfiguration().


svn path=/trunk/mcs/; revision=75808
2007-04-17 06:16:42 +00:00
Boris Kirzner 1f8dc337aa Marked not working tests.
svn path=/trunk/mcs/; revision=65564
2006-09-18 08:54:06 +00:00
Boris Kirzner 8ecc55e4a4 Small fixes for TARGET_JVM tests.
svn path=/trunk/mcs/; revision=64859
2006-09-04 12:38:20 +00:00
Boris Kirzner d44fb23e92 Added TARGET_JVM NET_2_0 tests projects and run scripts.
svn path=/trunk/mcs/; revision=64855
2006-09-04 12:16:45 +00:00
Atsushi Eno 968863d890 2006-07-07 Atsushi Enomoto <[email protected]>
* ConfigurationManager.cs : OpenExeConfiguration(null) should still
	  work. This is required for embedded scenario.

	* ConfigurationManagerTest.cs :
	  OpenExeConfiguration(null) should be allowed.


svn path=/trunk/mcs/; revision=62342
2006-07-07 07:16:05 +00:00
Atsushi Eno 892b90984e 2006-05-14 Atsushi Enomoto <[email protected]>
* ConfigurationManagerTest.cs :
          duh, why I overwrote it before commit :( Fix the build.


svn path=/trunk/mcs/; revision=60691
2006-05-14 17:06:04 +00:00
Atsushi Eno dff36b4dff 2006-05-12 Atsushi Enomoto <[email protected]>
* Configuration.cs : configPath is null for machine.config, so don't
	  use it. Use streamName instead. To my understanding, this should
	  fix bug #78372.

	* ConfigurationManagerTest.cs :
	  added test for OpenMachineConfiguration().


svn path=/trunk/mcs/; revision=60616
2006-05-12 09:54:22 +00:00
Atsushi Eno 521c0ea909 2006-05-10 Atsushi Enomoto <[email protected]>
* Makefile : add -r:System.Configuration under net_2_0.

	* ConfigurationSettings.cs : use ConfigurationManager.GetConfig()
	  in its GetConfig(). No need to change AppSettings and
	  Default.GetConfig() behavior here.

	* t35.cs, t35.exe.config, t35.exe.expected :
	  new test, largely from bug #78337.

	* ConfigurationManagerTest.cs :
	  added GetSectionReturnsNativeObject().

	* ConfigurationElement.cs,
	  DefaultSection.cs :
	  in some cases RawXml was set null string, so skip such cases.
	* Configuration.cs : support IConfigurationSectionHandler here.
	* ConfigurationManager.cs : GetSection() now returns name value
	  collection, not a section.
	* ConfigurationSection.cs : added SectionHandler for
	  IConfigurationSectionHandler support, and use its Create() in
	  GetRuntimeObject().
	* ClientConfigurationSystem.cs :
	  use GetRuntimeObject() in GetSection(). Thus now
	  ConfigurationManager.GetSection() returns a runtime object.
	  Fixed bug #78337.



svn path=/trunk/mcs/; revision=60483
2006-05-10 03:39:56 +00:00
Raja R Harinath 7afac93ad2 * System.Configuration/ConfigurationManagerTest.cs
(exePath_UserLevelNone_absolute, exePath_UserLevelNone)
(exePath_UserLevelNone_null): Disable compilation.  The
corresponding overloads don't exist.

svn path=/trunk/mcs/; revision=51330
2005-10-06 12:49:21 +00:00
Chris Toshok c3ad8132be 2005-10-05 Chris Toshok <[email protected]>
* CallbackValidatorTest.cs, IntegerValidatorTest.cs,
	StringValidatorTest.cs, DefaultValidatorTest.cs,
	LongValidatorTest.cs, RegexStringValidatorTest.cs,
	SubclassTypeValidatorTest.cs, ConfiguratoinLockCollectionTest.cs,
	ConfigurationElementCollectionTest.cs,
	ConfigurationManagerTest.cs: lots more tests.


svn path=/trunk/mcs/; revision=51285
2005-10-05 17:39:05 +00:00