-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use SimulationMode instead of OSPlatform (#563)
* Use SimulationMode instead of OSPlatform * Throw NotSupportedException when wrapping a DirectoryInfo, DriveInfo or FileInfo on a simulated MockFileSystem. * Accept API changes
- Loading branch information
Showing
17 changed files
with
256 additions
and
205 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
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
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System.Runtime.InteropServices; | ||
|
||
namespace Testably.Abstractions.Testing; | ||
|
||
/// <summary> | ||
/// The simulation mode for the <see cref="MockFileSystem" />. | ||
/// </summary> | ||
public enum SimulationMode | ||
{ | ||
/// <summary> | ||
/// Use the underlying operating system (default mode). | ||
/// </summary> | ||
Native = 0, | ||
|
||
/// <summary> | ||
/// Simulates <see cref="OSPlatform.Linux" />. | ||
/// </summary> | ||
Linux = 1, | ||
|
||
/// <summary> | ||
/// Simulates <see cref="OSPlatform.OSX" />. | ||
/// </summary> | ||
MacOS = 2, | ||
|
||
/// <summary> | ||
/// Simulates <see cref="OSPlatform.Windows" />. | ||
/// </summary> | ||
Windows = 3 | ||
} |
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
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
Oops, something went wrong.