Imported Upstream version 6.0.0.172

Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-04-12 14:10:50 +00:00
parent 8016999e4d
commit 64ac736ec5
32155 changed files with 3981439 additions and 75368 deletions

View File

@@ -42,6 +42,8 @@ using System.Collections.Specialized;
using NUnit.Framework;
using CategoryAttribute = NUnit.Framework.CategoryAttribute;
using MonoTests.Helpers;
namespace MonoTests.System.Configuration {
class ProviderPoker : LocalFileSettingsProvider {
public override void Initialize (string name,
@@ -164,14 +166,15 @@ namespace MonoTests.System.Configuration {
[TestFixture]
public class ApplicationSettingsBaseTest
{
TempDirectory _tempDir;
string tempDir;
[TestFixtureSetUp]
public void FixtureSetup ()
{
// Use random temp directory to store settings files of tests.
tempDir = Path.Combine (Path.GetTempPath (), Path.GetRandomFileName ());
Directory.CreateDirectory (tempDir);
_tempDir = new TempDirectory ();
tempDir = _tempDir.Path;
var localAppData = Path.Combine (tempDir, "LocalAppData");
Directory.CreateDirectory (localAppData);
var appData = Path.Combine (tempDir, "AppData");
@@ -186,7 +189,7 @@ namespace MonoTests.System.Configuration {
{
Environment.SetEnvironmentVariable ("XDG_DATA_HOME", null);
Environment.SetEnvironmentVariable ("XDG_CONFIG_HOME", null);
Directory.Delete (tempDir, true);
_tempDir.Dispose ();
}
[Test]

View File

@@ -34,24 +34,25 @@ using System.Configuration;
using NUnit.Framework;
using MonoTests.Helpers;
namespace MonoTests.System.Configuration {
[TestFixture]
public class ConfigXmlDocumentTest {
private TempDirectory _tempFolder;
private string tempFolder;
[SetUp]
public void SetUp ()
{
tempFolder = Path.Combine (Path.GetTempPath (), this.GetType ().FullName);
if (!Directory.Exists (tempFolder))
Directory.CreateDirectory (tempFolder);
_tempFolder = new TempDirectory ();
tempFolder = _tempFolder.Path;
}
[TearDown]
public void TearDown ()
{
if (Directory.Exists (tempFolder))
Directory.Delete (tempFolder, true);
_tempFolder.Dispose ();
}
[Test]

View File

@@ -33,27 +33,27 @@ using System.Xml;
using NUnit.Framework;
using MonoTests.Helpers;
namespace MonoTests.System.Configuration
{
[TestFixture]
public class ConfigurationExceptionTest
{
private TempDirectory temp;
private string foldername;
[SetUp]
public void SetUp ()
{
foldername = Path.Combine (Path.GetTempPath (),
this.GetType ().FullName);
if (!Directory.Exists (foldername))
Directory.CreateDirectory (foldername);
temp = new TempDirectory ();
foldername = temp.Path;
}
[TearDown]
public void TearDown ()
{
if (Directory.Exists (foldername))
Directory.Delete (foldername, true);
temp.Dispose ();
}
[Test] // ctor ()