135 Commits
Author SHA1 Message Date
Alexander Köplinger 23b1249cc4 [bcl] Fix nunitlite app.config file custom logic for tests
Makes it possible to precompute these config without actually running the tests.

Allows System.Configuration tests to use a different file.
2018-09-27 22:46:49 +02:00
Alexander Köplinger 2550144e79 [corlib/System/System.Configuration] Fix tests relying on the current directory to be the test folder
nunitlite runs tests shadow-copied in a temp folder, so looking up the resource based on the current dir doesn't work.
2016-10-29 14:09:35 +02:00
Marcos Henrich 863dc73d19 [bcl] Add NUnitHelper.cs with API not in nunit-lite
NUnitHelper.cs adds CollectionAssert, FileAssert, StringAssert.

Also adds AssertHelper class with methods that are not part of nunitlite
Assert class.
2016-10-29 14:09:33 +02:00
Alexander Köplinger 01c9543e08 [bcl] Add patching of nunit-lite-console.exe.config file
Because nunit-lite runs everything in the same AppDomain, we can't use dll.config files for settings anymore.
Since a few test suites rely on being able to read those settings we need to patch them into the main
nunit-lite-console.exe.config file instead before the test.

Remove all _test.dll.config files and replace with nunit-lite patcher equivalent
2016-10-29 14:09:32 +02:00
Marek Safar 26b4a3d856 Merge pull request #2891 from xmcclure/bug-39669
Allow xml configuration sections to reference System.dll (bug#39669)
2016-04-20 08:09:32 +02:00
Marek Safar 39d63219ee [System.Configuration] Fail tests on standalone error 2016-04-19 23:24:12 +02:00
Andi McClure fee605ccc5 Add xml configuration section test (bug#39669) 2016-04-19 17:13:31 -04:00
Marek Safar 11059591da [System.Configuration] re-enable standalone tests 2016-04-19 23:10:21 +02:00
Marcos Henrich 355d2c5eca Merge pull request #2400 from esdrubal/extrahead
[System] Fix extra head in config bug.
2016-02-15 12:21:29 +00:00
Alexander Köplinger b03e606287 Remove ChangeLog files from the repo
They weren't updated in the last 6 years and aren't helpful anymore (e.g. by causing unrelated matches during git grep searches).
2016-01-29 19:17:06 +01:00
Marcos Henrich 4980c52fff [System.Configuration] Test bad xml loading.
When ConfigurationManager.OpenMappedMachineConfiguration loads broken
xml ConfigurationErrorsException should be trown instead of
XmlException.
2016-01-05 11:56:24 +00:00
Alexander Köplinger 98cf04084a [bcl] Remove NET_4_0 defines from class libs
NET_4_0 is always defined now, so the ifdefs are redundant.
I verified the libs are exactly the same after this change, so this is effectively a no-op.
2015-07-26 15:01:49 +02:00
Alexander Köplinger 3a71f84cca [build] Fix a few Makefiles to correctly use net_4_x instead of net_4_5 2015-07-25 17:47:29 +02:00
Marek Safar bdf33794f7 [System.Configuration] Update default profile and remove old profiles files 2015-07-22 10:34:08 +02:00
Alex Rønne Petersen 351e94964c Remove obsolete profiles and profile checks from the build system.
* Removed all old profiles from VALID_PROFILE checks.
* Removed most logic under checks like ifeq (net_2_0), $(PROFILE)) as
  it is dead code now that those old profiles are gone.
* Simplified the list of assemblies in mcs/class/Makefile now that we
  only have one profile.
* LIBRARY_NEEDS_POSTPROCESSING has been removed as it was only used by
  old 1.x assemblies that no longer exist.
* Build logic that sets MONO_PATH now points to mcs/class/lib/net_4_5
  instead of mcs/class/lib/net_2_0.
2015-02-03 03:41:14 +01:00
Alexander Köplinger 746650d1b9 [bcl] Remove more NET_2_0 checks from class libs 2015-01-17 05:45:39 +01: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
Alexander Köplinger 0450000dc4 [Cleanup] Removed a bunch of superfluous .csproj and .sln files
Most of these files weren't updated in the last >5 years and serve no purpose today, so they only clutter the repository.
2014-08-06 18:02:30 +02:00
Tom Philpot dbee33d41c Add tests for AppSettingsSection. 2014-05-05 08:18:02 -07: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 5892855775 [System.Configuration]: Fix IsModified() logic for complex elements. 2012-12-29 01:25:48 +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
Andres G. Aragoneses 49886383b0 [System.Configuration] IntegerValidator's maxValue was 0 even if not used
When using IntegerValidator, if only MinValue is used, max value should
not be set by default to 0. Fix and unit tests included.

This fixes BNC#654721 (https://bugzilla.novell.com/show_bug.cgi?id=654721)
and therefore allows Enyim.Memcached to be used with Mono.
2012-10-31 23:40:39 +00: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
Raja R Harinath cd51491631 Fix a few cases of mixed line-endings
This is a scripted conversion of mixed line-ending files to LF-only or CRLF-only
based on which patch is smaller.  I used a threshold of upto a quarter of the
lines to determine whether to keep the patch or not.
2010-07-26 02:20:13 +05:30
Raja R Harinath b293948fb7 EOL handling
This set of .gitattributes was automatically generated from the list of files
that GIT tried to normalize when I enabled automatic EOL conversion.

With this set of attributes, we prevent automated EOL conversion on files that
we know will cause trouble down the road.
2010-07-25 20:17:39 +05:30
Jonathan Pobst 8b7e0e32ea 2010-01-15 Jonathan Pobst <[email protected]>
* ConfigurationErrorsExceptionTest.cs: Mark 4 failing tests as NotWorking.
	Filed as bug #571226.

svn path=/trunk/mcs/; revision=149654
2010-01-15 23:01:01 +00: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 c52dbbeb8b * ConfigurationManagerTest.cs: Added test for bug #323622.
svn path=/trunk/mcs/; revision=112960
2008-09-14 16:57:52 +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 cbe103cb5c added test for bug #413203.
svn path=/trunk/mcs/; revision=109501
2008-08-02 20:13:16 +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
Gert Driesen 76894bdd86 * t46.cs: Improve test coverage.
svn path=/trunk/mcs/; revision=107050
2008-07-02 10:46:41 +00:00
Gert Driesen 37aab507c8 * Makefile: added test t46.
* t46.cs, t46-lib.cs: added test for bug #405574.
* t46.exe.config, t46.exe.config2: config files for t46.
* t46.exe.expected: expected result for t46.

svn path=/trunk/mcs/; revision=107049
2008-07-02 10:26:50 +00:00
Atsushi Eno 5535c3f683 2008-06-27 Atsushi Enomoto <[email protected]>
* ConfigurationErrorsExceptionTest.cs : actually
          remove ignored tests.


svn path=/trunk/mcs/; revision=106790
2008-06-28 00:07:56 +00:00
Atsushi Eno c9627ec868 2008-06-27 Atsushi Enomoto <[email protected]>
* ConfigurationErrorsException.cs : recover from
          silly change that tries to prevent debuggin by
          decreasing error location information.

        * ConfigurationErrorsExceptionTest.cs : mark couple
          of tests as [Ignore] that blocks us from decent
          implementation in the name of silly .NET compatibility.

        Maybe I'll remove more silliness later.


svn path=/trunk/mcs/; revision=106776
2008-06-27 20:45:49 +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
Konstantin Triger 463fe4b128 properly override NameValueCollection to support interop with it
svn path=/trunk/mcs/; revision=91960
2007-12-27 18:51:37 +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
Atsushi Eno 3124e8a335 2007-11-15 Atsushi Enomoto <[email protected]>
* Makefile : added -r:System.Data.
	* t45.cs, t45.exe.expected : test for bug #323708.


svn path=/trunk/mcs/; revision=89702
2007-11-15 20:22:22 +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