-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated nunit and corrected tests. netcore tests uses 3.14 and net462 uses 4.1 * Update test.sdk to 17.9.0 * Warning cleanup * Removed more warnings, converted to filebased namespaces
- Loading branch information
1 parent
957c129
commit f9b355a
Showing
126 changed files
with
9,537 additions
and
9,799 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
427 changes: 213 additions & 214 deletions
427
src/NUnit.TestAdapter.Tests.Acceptance/AcceptanceTests.cs
Large diffs are not rendered by default.
Oops, something went wrong.
19 changes: 9 additions & 10 deletions
19
src/NUnit.TestAdapter.Tests.Acceptance/AcceptanceTestsTeardownFixture.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
using NUnit.Framework; | ||
|
||
namespace NUnit.VisualStudio.TestAdapter.Tests.Acceptance | ||
namespace NUnit.VisualStudio.TestAdapter.Tests.Acceptance; | ||
|
||
// https://github.com/nunit/nunit/issues/3166 | ||
[SetUpFixture] | ||
public sealed class AcceptanceTestsTeardownFixture | ||
{ | ||
// https://github.com/nunit/nunit/issues/3166 | ||
[SetUpFixture] | ||
public sealed class AcceptanceTestsTeardownFixture | ||
[OneTimeTearDown] | ||
public static void OneTimeTearDown() | ||
{ | ||
[OneTimeTearDown] | ||
public static void OneTimeTearDown() | ||
{ | ||
AcceptanceTests.OnGlobalTeardown(); | ||
} | ||
AcceptanceTests.OnGlobalTeardown(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,36 @@ | ||
using System; | ||
using System.IO; | ||
|
||
namespace NUnit.VisualStudio.TestAdapter.Tests.Acceptance | ||
namespace NUnit.VisualStudio.TestAdapter.Tests.Acceptance; | ||
|
||
public sealed class DirectoryMutex : IDisposable | ||
{ | ||
public sealed class DirectoryMutex : IDisposable | ||
private readonly FileStream mutexFile; | ||
|
||
public static DirectoryMutex TryAcquire(string directoryPath) | ||
{ | ||
private readonly FileStream mutexFile; | ||
var mutexFilePath = Path.Combine(directoryPath, ".mutex"); | ||
|
||
public static DirectoryMutex TryAcquire(string directoryPath) | ||
FileStream stream; | ||
try | ||
{ | ||
var mutexFilePath = Path.Combine(directoryPath, ".mutex"); | ||
|
||
FileStream stream; | ||
try | ||
{ | ||
stream = new FileStream(mutexFilePath, FileMode.Create, FileAccess.Write, FileShare.None, bufferSize: 1, FileOptions.DeleteOnClose); | ||
} | ||
catch (IOException) // On Windows, (ushort)ex.HResult will be ERROR_SHARING_VIOLATION | ||
{ | ||
return null; | ||
} | ||
|
||
return new DirectoryMutex(stream, directoryPath); | ||
stream = new FileStream(mutexFilePath, FileMode.Create, FileAccess.Write, FileShare.None, bufferSize: 1, FileOptions.DeleteOnClose); | ||
} | ||
|
||
private DirectoryMutex(FileStream mutexFile, string directoryPath) | ||
catch (IOException) // On Windows, (ushort)ex.HResult will be ERROR_SHARING_VIOLATION | ||
{ | ||
this.mutexFile = mutexFile ?? throw new ArgumentNullException(nameof(mutexFile)); | ||
DirectoryPath = directoryPath ?? throw new ArgumentNullException(nameof(directoryPath)); | ||
return null; | ||
} | ||
|
||
public string DirectoryPath { get; } | ||
return new DirectoryMutex(stream, directoryPath); | ||
} | ||
|
||
public void Dispose() => mutexFile.Dispose(); | ||
private DirectoryMutex(FileStream mutexFile, string directoryPath) | ||
{ | ||
this.mutexFile = mutexFile ?? throw new ArgumentNullException(nameof(mutexFile)); | ||
DirectoryPath = directoryPath ?? throw new ArgumentNullException(nameof(directoryPath)); | ||
} | ||
} | ||
|
||
public string DirectoryPath { get; } | ||
|
||
public void Dispose() => mutexFile.Dispose(); | ||
} |
Oops, something went wrong.