32 Commits
Author SHA1 Message Date
Rolf Bjarne Kvinge 632bb59b21 [System] Implement a helper function to create unique temporary directories and use it in tests. (#11831)
While working on PR #11829 I stress-tested the tests by running multiple test
runs in parallel, and it turned out that many tests were not parallel-safe,
because they used the same temporary file names and ended up stomping on
eachother.

So I implemented a helper method that creates a guaranteed unique temporary
directory, and I've changed all tests to use this new helper method.
2018-12-04 16:43:23 +01:00
Alexis Christoforides e85dbca0f2 Disable TestBug8592BasicOperations test
https://github.com/mono/mono/issues/7343
2018-03-12 11:57:39 -04:00
Alexander Köplinger b5c5c55368 [System] Recursively delete directory in ApplicationSettingsBaseTest
Otherwise we'd get a "directory not empty" exception in the
TestFixtureTearDown (which for some reason isn't shown in the log?).

This was added in https://github.com/mono/mono/pull/6272
2018-01-06 01:40:49 +01:00
Alexander Köplinger e0f362764e [System] Clear XDG_DATA_HOME and XDG_CONFIG_HOME in ApplicationSettingsBase tests (#6417)
They were set in https://github.com/mono/mono/pull/6272 but since
env vars are process wide we'd end up with non-existing paths once
the tests are done. It is safer to unset the variables after the test.
2018-01-06 01:37:26 +01:00
Eberhard Beilharz 63a8b08dd7 [System] Improve ApplicationSettingsBase behavior (#6272)
* [System] Add unit test for Xamarin-2315

* [System] Use temporary directory for saving settings files

This change modifies the ApplicationSettingsBaseTests so that they
store the settings files in a temporary directory. This reduces
the risk of failed tests because of stale files from previous test
run, or from a build that runs in parallel.

* [System] Improve Settings behavior (Xamarin-15818)

Improve behavior of ApplicationSettingsBase class to match Windows .NET
more closely.
* Implement Upgrade to allow Upgrading of settings
* Make SettingsPropertyValue serialization work for complex objects
* Make Save and Update throw in unimplemented configurations
* Changed Reload to clear PropertyValues so they are reloaded
  and fire PropertyChanged event for all Properties
* Modified Reset to do what Reload used to do.
* Added a backup Type loading for custom SettingsProviders
* don't call SettingsSaving on Reset()

* [System] Fire SettingsSaving event (Xamarin-2315)

When calling ApplicationSettingsBase.Save() the SettingsSaving
event has to be fired.

* [System] Add unit tests for Xamarin-15818
2018-01-05 13:08:20 +01:00
Chris Hamons 4d1e45d76a AppleTls Support (#4470) 2017-03-22 19:15:02 +01: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 180e745cce [bcl] Fix dll names and InternalsVisibleTo for test assemblies
The format of the test assembly name changed in 860334ff45
from System.Web_test_net_4_x.dll to net_4_x_System.Web_test.dll.

This fixes all the places where the old name was used.
2016-01-27 23:39:00 +01:00
Marcos Henrich 4d56564adc [System] Test configuration extra xml headers bug
Covers #36388
2016-01-05 11:56:25 +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
Marek Habersack b9cff43b3c [tests] 4.x profiles produce test assembly suffixed with 4_x now 2015-07-15 21:47:34 +02:00
Marek Safar e58097e957 [corlib] String from reference sources, fixes mostly string.format issues 2015-03-25 15:08:06 +01:00
Atsushi Eno d9184320f7 [Configuration] skip whitespaces in the settings xml.
This is required after we switch to referencesource, which somehow
preserves whitespaces during deserialization from xml.
2015-02-21 03:29:21 +08:00
Alexander Köplinger 746650d1b9 [bcl] Remove more NET_2_0 checks from class libs 2015-01-17 05:45:39 +01:00
Marek Safar 30ee7c53a4 [system] update failing tests 2015-01-15 23:13:36 +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
Atsushi Eno 05d46a8fc9 fix bug #8533 - more than one user config section should be generated in ApplicationSettingsBase.Save().
Patch by Kei Nakazawa.
2012-11-27 19:49:19 +09:00
Atsushi Eno 2ce799595e fix xbc bug #8592: Make sure to reload configuration when Reset() was invoked.
Patch by Kei Nakazawa.
2012-11-27 16:13:30 +09:00
Rodrigo Kumpera eeb6c66e9c Fix compilation of System.Configuration test suite. 2012-03-21 18:25:32 -03:00
Marek Safar 4bdd2d7170 Fix few unit tests 2012-03-15 14:06:46 +00:00
Zoltan Varga 6bd1461883 Fix running of tests under net 4.0. 2010-08-18 12:00:20 +02:00
Gonzalo Paniagua Javier f272f2d0a7 2009-08-31 Gonzalo Paniagua Javier <[email protected]>
* CustomizableFileSettingsProvider.cs: reset the property value
	instead of using the DefaultValue.
	* SettingsPropertyValue.cs: new Reset() method.
	* ApplicationSettingsBase.cs: Reset happens in Reload().
	Patch by Andrew Kurochka that fixes bug #532180.


svn path=/trunk/mcs/; revision=140950
2009-08-31 09:20:07 +00:00
Gert Driesen f229ae8876 * ApplicationSettingsBaseTest.cs: Fixed line endings.
svn path=/trunk/mcs/; revision=106584
2008-06-25 17:22:56 +00:00
Arina Itkes e86d0f17f3 TARGET_JVM: return flow to the version before revision 80469
svn path=/trunk/mcs/; revision=88815
2007-11-04 10:30:24 +00:00
Atsushi Eno 7bd45eeed6 2007-05-31 Atsushi Enomoto <[email protected]>
* ApplicationSettingsBaseTest.cs : NotWorking Providers().


svn path=/trunk/mcs/; revision=78298
2007-05-31 04:47:31 +00:00
Atsushi Eno 9274590c24 2007-05-30 Atsushi Enomoto <[email protected]>
* SettingsBase.cs : property values are filled only when each
	  property is accessed. It should not use virtual providers,
	  properties or context internally since they could be overriden.
	* SettingsPropertyValue.cs : to serialize value as string, use
	  TypeConverter as well (as deserialization).
	* SettingsProviderCollection.cs : (Add) null arg check.

	* SettingsBaseTest.cs : new test.
	* ApplicationSettingsBaseTest.cs : added Providers().

	* System_test.dll.sources : added SettingsBaseTest.cs.


svn path=/trunk/mcs/; revision=78181
2007-05-30 10:03:57 +00:00
Atsushi Eno 32f699f7ec 2007-05-28 Atsushi Enomoto <[email protected]>
* SettingsProviderAttribute.cs :
	  Return assembly qualified name. Check null args.
	* ConfigXmlDocument.cs : it implements IConfigErrorInfo.

	* ApplicationSettingsBaseTest.cs : enable working test.


svn path=/trunk/mcs/; revision=78043
2007-05-28 10:31:33 +00:00
Sebastien Pouliot 167af54e3c 2006-11-09 Sebastien Pouliot <[email protected]>
* ApplicationSettingsBaseTest.cs: Added test case for StringCollection
	properties (that encode the string list in XML).


svn path=/trunk/mcs/; revision=67598
2006-11-09 14:58:40 +00:00
Atsushi Eno fde86f617c 2006-06-29 Atsushi Enomoto <[email protected]>
* ApplicationSettingsBase.cs : When we use default value, convert it
	  to proper type. Fixed bug #78654. Patch by Gareth Pearce.

	* ApplicationSettingsBaseTest.cs : added test for bug #78654.


svn path=/trunk/mcs/; revision=62136
2006-06-29 05:06:20 +00:00
Atsushi Eno 73e29a4fb9 2006-05-17 Atsushi Enomoto <[email protected]>
* SettingsPropertyCollection.cs : implemented some synchronization
	  releated members. Actually it can never be synchronized by itself.
	* SettingsBase.cs : Synchronized() just returns the same instance,
	  marking it as IsSynchronized = true. Fixed bug #78430.

	* LocalFileSettingsProviderTest.cs : commented some lines in
	  Initialized() as they don't work under .NET.
	* ApplicationSettingsBaseTest.cs : added Synchronized(), test for
	  bug #78430.

	* SwitchesTest.cs : Ignore NewSwitch under 2.0 as it fails under
	  .NET.


svn path=/trunk/mcs/; revision=60792
2006-05-17 17:20:02 +00:00
Chris Toshok 33538744aa fix up the System.Configuration unit tests.
svn path=/trunk/mcs/; revision=60337
2006-05-05 19:55:30 +00:00
Chris Toshok 3a8163441e 2005-09-21 Chris Toshok <[email protected]>
* System.Configuration/ApplicationSettingsBaseTest.cs: start of
	tests.  These are going to be rather convoluted.


svn path=/trunk/mcs/; revision=50401
2005-09-21 18:44:24 +00:00