diff --git a/Directory.Packages.props b/Directory.Packages.props index 8c2a217a4..9a139b7ca 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -42,7 +42,7 @@ - + diff --git a/Tests/Api/Testably.Abstractions.Api.Tests/Expected/Testably.Abstractions.Compression_net6.0.txt b/Tests/Api/Testably.Abstractions.Api.Tests/Expected/Testably.Abstractions.Compression_net6.0.txt index efb95a16b..f1ba74e20 100644 --- a/Tests/Api/Testably.Abstractions.Api.Tests/Expected/Testably.Abstractions.Compression_net6.0.txt +++ b/Tests/Api/Testably.Abstractions.Api.Tests/Expected/Testably.Abstractions.Compression_net6.0.txt @@ -48,8 +48,8 @@ namespace Testably.Abstractions void CreateFromDirectory(string sourceDirectoryName, string destinationArchiveFileName, System.IO.Compression.CompressionLevel compressionLevel, bool includeBaseDirectory); void CreateFromDirectory(string sourceDirectoryName, string destinationArchiveFileName, System.IO.Compression.CompressionLevel compressionLevel, bool includeBaseDirectory, System.Text.Encoding entryNameEncoding); void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName); - void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName, bool overwriteFiles); void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName, System.Text.Encoding? entryNameEncoding); + void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName, bool overwriteFiles); void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName, System.Text.Encoding? entryNameEncoding, bool overwriteFiles); Testably.Abstractions.IZipArchive Open(string archiveFileName, System.IO.Compression.ZipArchiveMode mode); Testably.Abstractions.IZipArchive Open(string archiveFileName, System.IO.Compression.ZipArchiveMode mode, System.Text.Encoding? entryNameEncoding); diff --git a/Tests/Api/Testably.Abstractions.Api.Tests/Expected/Testably.Abstractions.Compression_net8.0.txt b/Tests/Api/Testably.Abstractions.Api.Tests/Expected/Testably.Abstractions.Compression_net8.0.txt index 6a6a915ca..c963ad7ab 100644 --- a/Tests/Api/Testably.Abstractions.Api.Tests/Expected/Testably.Abstractions.Compression_net8.0.txt +++ b/Tests/Api/Testably.Abstractions.Api.Tests/Expected/Testably.Abstractions.Compression_net8.0.txt @@ -55,10 +55,10 @@ namespace Testably.Abstractions void CreateFromDirectory(string sourceDirectoryName, string destinationArchiveFileName, System.IO.Compression.CompressionLevel compressionLevel, bool includeBaseDirectory, System.Text.Encoding entryNameEncoding); void ExtractToDirectory(System.IO.Stream source, string destinationDirectoryName); void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName); - void ExtractToDirectory(System.IO.Stream source, string destinationDirectoryName, bool overwriteFiles); void ExtractToDirectory(System.IO.Stream source, string destinationDirectoryName, System.Text.Encoding entryNameEncoding); - void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName, bool overwriteFiles); + void ExtractToDirectory(System.IO.Stream source, string destinationDirectoryName, bool overwriteFiles); void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName, System.Text.Encoding? entryNameEncoding); + void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName, bool overwriteFiles); void ExtractToDirectory(System.IO.Stream source, string destinationDirectoryName, System.Text.Encoding entryNameEncoding, bool overwriteFiles); void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName, System.Text.Encoding? entryNameEncoding, bool overwriteFiles); Testably.Abstractions.IZipArchive Open(string archiveFileName, System.IO.Compression.ZipArchiveMode mode); diff --git a/Tests/Api/Testably.Abstractions.Api.Tests/Expected/Testably.Abstractions.Compression_net9.0.txt b/Tests/Api/Testably.Abstractions.Api.Tests/Expected/Testably.Abstractions.Compression_net9.0.txt index 2bd3d20e9..f26bd8409 100644 --- a/Tests/Api/Testably.Abstractions.Api.Tests/Expected/Testably.Abstractions.Compression_net9.0.txt +++ b/Tests/Api/Testably.Abstractions.Api.Tests/Expected/Testably.Abstractions.Compression_net9.0.txt @@ -55,10 +55,10 @@ namespace Testably.Abstractions void CreateFromDirectory(string sourceDirectoryName, string destinationArchiveFileName, System.IO.Compression.CompressionLevel compressionLevel, bool includeBaseDirectory, System.Text.Encoding entryNameEncoding); void ExtractToDirectory(System.IO.Stream source, string destinationDirectoryName); void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName); - void ExtractToDirectory(System.IO.Stream source, string destinationDirectoryName, bool overwriteFiles); void ExtractToDirectory(System.IO.Stream source, string destinationDirectoryName, System.Text.Encoding entryNameEncoding); - void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName, bool overwriteFiles); + void ExtractToDirectory(System.IO.Stream source, string destinationDirectoryName, bool overwriteFiles); void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName, System.Text.Encoding? entryNameEncoding); + void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName, bool overwriteFiles); void ExtractToDirectory(System.IO.Stream source, string destinationDirectoryName, System.Text.Encoding entryNameEncoding, bool overwriteFiles); void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName, System.Text.Encoding? entryNameEncoding, bool overwriteFiles); Testably.Abstractions.IZipArchive Open(string archiveFileName, System.IO.Compression.ZipArchiveMode mode); diff --git a/Tests/Api/Testably.Abstractions.Api.Tests/Expected/Testably.Abstractions.Compression_netstandard2.1.txt b/Tests/Api/Testably.Abstractions.Api.Tests/Expected/Testably.Abstractions.Compression_netstandard2.1.txt index 99b8bfc11..0b7c4fc47 100644 --- a/Tests/Api/Testably.Abstractions.Api.Tests/Expected/Testably.Abstractions.Compression_netstandard2.1.txt +++ b/Tests/Api/Testably.Abstractions.Api.Tests/Expected/Testably.Abstractions.Compression_netstandard2.1.txt @@ -48,8 +48,8 @@ namespace Testably.Abstractions void CreateFromDirectory(string sourceDirectoryName, string destinationArchiveFileName, System.IO.Compression.CompressionLevel compressionLevel, bool includeBaseDirectory); void CreateFromDirectory(string sourceDirectoryName, string destinationArchiveFileName, System.IO.Compression.CompressionLevel compressionLevel, bool includeBaseDirectory, System.Text.Encoding entryNameEncoding); void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName); - void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName, bool overwriteFiles); void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName, System.Text.Encoding? entryNameEncoding); + void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName, bool overwriteFiles); void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName, System.Text.Encoding? entryNameEncoding, bool overwriteFiles); Testably.Abstractions.IZipArchive Open(string archiveFileName, System.IO.Compression.ZipArchiveMode mode); Testably.Abstractions.IZipArchive Open(string archiveFileName, System.IO.Compression.ZipArchiveMode mode, System.Text.Encoding? entryNameEncoding); diff --git a/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.FileSystem.Interface_net6.0.txt b/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.FileSystem.Interface_net6.0.txt index 5d3e3fa51..8f929eefe 100644 --- a/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.FileSystem.Interface_net6.0.txt +++ b/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.FileSystem.Interface_net6.0.txt @@ -270,8 +270,8 @@ namespace System.IO.Abstractions System.IO.Abstractions.FileSystemStream New(Microsoft.Win32.SafeHandles.SafeFileHandle handle, System.IO.FileAccess access, int bufferSize, bool isAsync); System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share); System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize); - System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, bool useAsync); System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, System.IO.FileOptions options); + System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, bool useAsync); System.IO.Abstractions.FileSystemStream Wrap(System.IO.FileStream fileStream); } public interface IFileSystem diff --git a/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.FileSystem.Interface_net8.0.txt b/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.FileSystem.Interface_net8.0.txt index dfc0d9fdd..1904e5ef2 100644 --- a/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.FileSystem.Interface_net8.0.txt +++ b/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.FileSystem.Interface_net8.0.txt @@ -296,8 +296,8 @@ namespace System.IO.Abstractions System.IO.Abstractions.FileSystemStream New(Microsoft.Win32.SafeHandles.SafeFileHandle handle, System.IO.FileAccess access, int bufferSize, bool isAsync); System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share); System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize); - System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, bool useAsync); System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, System.IO.FileOptions options); + System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, bool useAsync); System.IO.Abstractions.FileSystemStream Wrap(System.IO.FileStream fileStream); } public interface IFileSystem @@ -374,8 +374,8 @@ namespace System.IO.Abstractions void BeginInit(); void EndInit(); System.IO.Abstractions.IWaitForChangedResult WaitForChanged(System.IO.WatcherChangeTypes changeType); - System.IO.Abstractions.IWaitForChangedResult WaitForChanged(System.IO.WatcherChangeTypes changeType, int timeout); System.IO.Abstractions.IWaitForChangedResult WaitForChanged(System.IO.WatcherChangeTypes changeType, System.TimeSpan timeout); + System.IO.Abstractions.IWaitForChangedResult WaitForChanged(System.IO.WatcherChangeTypes changeType, int timeout); } public interface IFileSystemWatcherFactory : System.IO.Abstractions.IFileSystemEntity { diff --git a/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.FileSystem.Interface_net9.0.txt b/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.FileSystem.Interface_net9.0.txt index b31dd604c..d26b9fc2f 100644 --- a/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.FileSystem.Interface_net9.0.txt +++ b/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.FileSystem.Interface_net9.0.txt @@ -156,10 +156,10 @@ namespace System.IO.Abstractions } public interface IFile : System.IO.Abstractions.IFileSystemEntity { - void AppendAllBytes(string path, byte[] bytes); void AppendAllBytes(string path, System.ReadOnlySpan bytes); - System.Threading.Tasks.Task AppendAllBytesAsync(string path, byte[] bytes, System.Threading.CancellationToken cancellationToken = default); + void AppendAllBytes(string path, byte[] bytes); System.Threading.Tasks.Task AppendAllBytesAsync(string path, System.ReadOnlyMemory bytes, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task AppendAllBytesAsync(string path, byte[] bytes, System.Threading.CancellationToken cancellationToken = default); void AppendAllLines(string path, System.Collections.Generic.IEnumerable contents); void AppendAllLines(string path, System.Collections.Generic.IEnumerable contents, System.Text.Encoding encoding); System.Threading.Tasks.Task AppendAllLinesAsync(string path, System.Collections.Generic.IEnumerable contents, System.Threading.CancellationToken cancellationToken = default); @@ -248,10 +248,10 @@ namespace System.IO.Abstractions void SetUnixFileMode(Microsoft.Win32.SafeHandles.SafeFileHandle fileHandle, System.IO.UnixFileMode mode); [System.Runtime.Versioning.UnsupportedOSPlatform("windows")] void SetUnixFileMode(string path, System.IO.UnixFileMode mode); - void WriteAllBytes(string path, byte[] bytes); void WriteAllBytes(string path, System.ReadOnlySpan bytes); - System.Threading.Tasks.Task WriteAllBytesAsync(string path, byte[] bytes, System.Threading.CancellationToken cancellationToken = default); + void WriteAllBytes(string path, byte[] bytes); System.Threading.Tasks.Task WriteAllBytesAsync(string path, System.ReadOnlyMemory bytes, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task WriteAllBytesAsync(string path, byte[] bytes, System.Threading.CancellationToken cancellationToken = default); void WriteAllLines(string path, System.Collections.Generic.IEnumerable contents); void WriteAllLines(string path, string[] contents); void WriteAllLines(string path, System.Collections.Generic.IEnumerable contents, System.Text.Encoding encoding); @@ -310,8 +310,8 @@ namespace System.IO.Abstractions System.IO.Abstractions.FileSystemStream New(Microsoft.Win32.SafeHandles.SafeFileHandle handle, System.IO.FileAccess access, int bufferSize, bool isAsync); System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share); System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize); - System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, bool useAsync); System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, System.IO.FileOptions options); + System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, bool useAsync); System.IO.Abstractions.FileSystemStream Wrap(System.IO.FileStream fileStream); } public interface IFileSystem @@ -388,8 +388,8 @@ namespace System.IO.Abstractions void BeginInit(); void EndInit(); System.IO.Abstractions.IWaitForChangedResult WaitForChanged(System.IO.WatcherChangeTypes changeType); - System.IO.Abstractions.IWaitForChangedResult WaitForChanged(System.IO.WatcherChangeTypes changeType, int timeout); System.IO.Abstractions.IWaitForChangedResult WaitForChanged(System.IO.WatcherChangeTypes changeType, System.TimeSpan timeout); + System.IO.Abstractions.IWaitForChangedResult WaitForChanged(System.IO.WatcherChangeTypes changeType, int timeout); } public interface IFileSystemWatcherFactory : System.IO.Abstractions.IFileSystemEntity { diff --git a/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.FileSystem.Interface_netstandard2.0.txt b/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.FileSystem.Interface_netstandard2.0.txt index 71fa5aef0..53cc6daa9 100644 --- a/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.FileSystem.Interface_netstandard2.0.txt +++ b/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.FileSystem.Interface_netstandard2.0.txt @@ -231,8 +231,8 @@ namespace System.IO.Abstractions System.IO.Abstractions.FileSystemStream New(Microsoft.Win32.SafeHandles.SafeFileHandle handle, System.IO.FileAccess access, int bufferSize, bool isAsync); System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share); System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize); - System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, bool useAsync); System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, System.IO.FileOptions options); + System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, bool useAsync); System.IO.Abstractions.FileSystemStream Wrap(System.IO.FileStream fileStream); } public interface IFileSystem diff --git a/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.FileSystem.Interface_netstandard2.1.txt b/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.FileSystem.Interface_netstandard2.1.txt index 8bbb66c30..a35e569d8 100644 --- a/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.FileSystem.Interface_netstandard2.1.txt +++ b/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.FileSystem.Interface_netstandard2.1.txt @@ -261,8 +261,8 @@ namespace System.IO.Abstractions System.IO.Abstractions.FileSystemStream New(Microsoft.Win32.SafeHandles.SafeFileHandle handle, System.IO.FileAccess access, int bufferSize, bool isAsync); System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share); System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize); - System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, bool useAsync); System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, System.IO.FileOptions options); + System.IO.Abstractions.FileSystemStream New(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, bool useAsync); System.IO.Abstractions.FileSystemStream Wrap(System.IO.FileStream fileStream); } public interface IFileSystem diff --git a/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.Interface_net6.0.txt b/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.Interface_net6.0.txt index 40fd938fd..708bb8a04 100644 --- a/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.Interface_net6.0.txt +++ b/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.Interface_net6.0.txt @@ -30,8 +30,8 @@ namespace Testably.Abstractions.Helpers public int Next() { } public int Next(int maxValue) { } public int Next(int minValue, int maxValue) { } - public void NextBytes(byte[] buffer) { } public void NextBytes(System.Span buffer) { } + public void NextBytes(byte[] buffer) { } public double NextDouble() { } public long NextInt64() { } public long NextInt64(long maxValue) { } @@ -74,8 +74,8 @@ namespace Testably.Abstractions.RandomSystem int Next(); int Next(int maxValue); int Next(int minValue, int maxValue); - void NextBytes(byte[] buffer); void NextBytes(System.Span buffer); + void NextBytes(byte[] buffer); double NextDouble(); long NextInt64(); long NextInt64(long maxValue); @@ -106,15 +106,15 @@ namespace Testably.Abstractions.TimeSystem } public interface ITask : Testably.Abstractions.TimeSystem.ITimeSystemEntity { - System.Threading.Tasks.Task Delay(int millisecondsDelay); System.Threading.Tasks.Task Delay(System.TimeSpan delay); - System.Threading.Tasks.Task Delay(int millisecondsDelay, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task Delay(int millisecondsDelay); System.Threading.Tasks.Task Delay(System.TimeSpan delay, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task Delay(int millisecondsDelay, System.Threading.CancellationToken cancellationToken); } public interface IThread : Testably.Abstractions.TimeSystem.ITimeSystemEntity { - void Sleep(int millisecondsTimeout); void Sleep(System.TimeSpan timeout); + void Sleep(int millisecondsTimeout); } public interface ITimeSystemEntity { @@ -122,17 +122,17 @@ namespace Testably.Abstractions.TimeSystem } public interface ITimer : System.IAsyncDisposable, System.IDisposable, Testably.Abstractions.TimeSystem.ITimeSystemEntity { + bool Change(System.TimeSpan dueTime, System.TimeSpan period); bool Change(int dueTime, int period); bool Change(long dueTime, long period); - bool Change(System.TimeSpan dueTime, System.TimeSpan period); bool Dispose(System.Threading.WaitHandle notifyObject); } public interface ITimerFactory : Testably.Abstractions.TimeSystem.ITimeSystemEntity { Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback); + Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback, object? state, System.TimeSpan dueTime, System.TimeSpan period); Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback, object? state, int dueTime, int period); Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback, object? state, long dueTime, long period); - Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback, object? state, System.TimeSpan dueTime, System.TimeSpan period); Testably.Abstractions.TimeSystem.ITimer Wrap(System.Threading.Timer timer); } } \ No newline at end of file diff --git a/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.Interface_net8.0.txt b/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.Interface_net8.0.txt index 2625fbbaf..944543004 100644 --- a/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.Interface_net8.0.txt +++ b/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.Interface_net8.0.txt @@ -31,14 +31,14 @@ namespace Testably.Abstractions.Helpers public sealed class RandomWrapper : Testably.Abstractions.RandomSystem.IRandom { public RandomWrapper(System.Random instance) { } - public T[] GetItems(System.ReadOnlySpan choices, int length) { } public void GetItems(System.ReadOnlySpan choices, System.Span destination) { } + public T[] GetItems(System.ReadOnlySpan choices, int length) { } public T[] GetItems(T[] choices, int length) { } public int Next() { } public int Next(int maxValue) { } public int Next(int minValue, int maxValue) { } - public void NextBytes(byte[] buffer) { } public void NextBytes(System.Span buffer) { } + public void NextBytes(byte[] buffer) { } public double NextDouble() { } public long NextInt64() { } public long NextInt64(long maxValue) { } @@ -84,14 +84,14 @@ namespace Testably.Abstractions.RandomSystem } public interface IRandom { - T[] GetItems(System.ReadOnlySpan choices, int length); void GetItems(System.ReadOnlySpan choices, System.Span destination); + T[] GetItems(System.ReadOnlySpan choices, int length); T[] GetItems(T[] choices, int length); int Next(); int Next(int maxValue); int Next(int minValue, int maxValue); - void NextBytes(byte[] buffer); void NextBytes(System.Span buffer); + void NextBytes(byte[] buffer); double NextDouble(); long NextInt64(); long NextInt64(long maxValue); @@ -124,15 +124,15 @@ namespace Testably.Abstractions.TimeSystem } public interface ITask : Testably.Abstractions.TimeSystem.ITimeSystemEntity { - System.Threading.Tasks.Task Delay(int millisecondsDelay); System.Threading.Tasks.Task Delay(System.TimeSpan delay); - System.Threading.Tasks.Task Delay(int millisecondsDelay, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task Delay(int millisecondsDelay); System.Threading.Tasks.Task Delay(System.TimeSpan delay, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task Delay(int millisecondsDelay, System.Threading.CancellationToken cancellationToken); } public interface IThread : Testably.Abstractions.TimeSystem.ITimeSystemEntity { - void Sleep(int millisecondsTimeout); void Sleep(System.TimeSpan timeout); + void Sleep(int millisecondsTimeout); } public interface ITimeSystemEntity { @@ -140,17 +140,17 @@ namespace Testably.Abstractions.TimeSystem } public interface ITimer : System.IAsyncDisposable, System.IDisposable, Testably.Abstractions.TimeSystem.ITimeSystemEntity { + bool Change(System.TimeSpan dueTime, System.TimeSpan period); bool Change(int dueTime, int period); bool Change(long dueTime, long period); - bool Change(System.TimeSpan dueTime, System.TimeSpan period); bool Dispose(System.Threading.WaitHandle notifyObject); } public interface ITimerFactory : Testably.Abstractions.TimeSystem.ITimeSystemEntity { Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback); + Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback, object? state, System.TimeSpan dueTime, System.TimeSpan period); Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback, object? state, int dueTime, int period); Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback, object? state, long dueTime, long period); - Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback, object? state, System.TimeSpan dueTime, System.TimeSpan period); Testably.Abstractions.TimeSystem.ITimer Wrap(System.Threading.Timer timer); } } \ No newline at end of file diff --git a/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.Interface_net9.0.txt b/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.Interface_net9.0.txt index a261d7ec3..830147a3a 100644 --- a/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.Interface_net9.0.txt +++ b/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.Interface_net9.0.txt @@ -33,14 +33,14 @@ namespace Testably.Abstractions.Helpers public sealed class RandomWrapper : Testably.Abstractions.RandomSystem.IRandom { public RandomWrapper(System.Random instance) { } - public T[] GetItems(System.ReadOnlySpan choices, int length) { } public void GetItems(System.ReadOnlySpan choices, System.Span destination) { } + public T[] GetItems(System.ReadOnlySpan choices, int length) { } public T[] GetItems(T[] choices, int length) { } public int Next() { } public int Next(int maxValue) { } public int Next(int minValue, int maxValue) { } - public void NextBytes(byte[] buffer) { } public void NextBytes(System.Span buffer) { } + public void NextBytes(byte[] buffer) { } public double NextDouble() { } public long NextInt64() { } public long NextInt64(long maxValue) { } @@ -88,14 +88,14 @@ namespace Testably.Abstractions.RandomSystem } public interface IRandom { - T[] GetItems(System.ReadOnlySpan choices, int length); void GetItems(System.ReadOnlySpan choices, System.Span destination); + T[] GetItems(System.ReadOnlySpan choices, int length); T[] GetItems(T[] choices, int length); int Next(); int Next(int maxValue); int Next(int minValue, int maxValue); - void NextBytes(byte[] buffer); void NextBytes(System.Span buffer); + void NextBytes(byte[] buffer); double NextDouble(); long NextInt64(); long NextInt64(long maxValue); @@ -128,15 +128,15 @@ namespace Testably.Abstractions.TimeSystem } public interface ITask : Testably.Abstractions.TimeSystem.ITimeSystemEntity { - System.Threading.Tasks.Task Delay(int millisecondsDelay); System.Threading.Tasks.Task Delay(System.TimeSpan delay); - System.Threading.Tasks.Task Delay(int millisecondsDelay, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task Delay(int millisecondsDelay); System.Threading.Tasks.Task Delay(System.TimeSpan delay, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task Delay(int millisecondsDelay, System.Threading.CancellationToken cancellationToken); } public interface IThread : Testably.Abstractions.TimeSystem.ITimeSystemEntity { - void Sleep(int millisecondsTimeout); void Sleep(System.TimeSpan timeout); + void Sleep(int millisecondsTimeout); } public interface ITimeSystemEntity { @@ -144,17 +144,17 @@ namespace Testably.Abstractions.TimeSystem } public interface ITimer : System.IAsyncDisposable, System.IDisposable, Testably.Abstractions.TimeSystem.ITimeSystemEntity { + bool Change(System.TimeSpan dueTime, System.TimeSpan period); bool Change(int dueTime, int period); bool Change(long dueTime, long period); - bool Change(System.TimeSpan dueTime, System.TimeSpan period); bool Dispose(System.Threading.WaitHandle notifyObject); } public interface ITimerFactory : Testably.Abstractions.TimeSystem.ITimeSystemEntity { Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback); + Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback, object? state, System.TimeSpan dueTime, System.TimeSpan period); Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback, object? state, int dueTime, int period); Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback, object? state, long dueTime, long period); - Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback, object? state, System.TimeSpan dueTime, System.TimeSpan period); Testably.Abstractions.TimeSystem.ITimer Wrap(System.Threading.Timer timer); } } \ No newline at end of file diff --git a/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.Interface_netstandard2.0.txt b/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.Interface_netstandard2.0.txt index 2cb7c0dd7..41ed63b15 100644 --- a/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.Interface_netstandard2.0.txt +++ b/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.Interface_netstandard2.0.txt @@ -80,15 +80,15 @@ namespace Testably.Abstractions.TimeSystem } public interface ITask : Testably.Abstractions.TimeSystem.ITimeSystemEntity { - System.Threading.Tasks.Task Delay(int millisecondsDelay); System.Threading.Tasks.Task Delay(System.TimeSpan delay); - System.Threading.Tasks.Task Delay(int millisecondsDelay, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task Delay(int millisecondsDelay); System.Threading.Tasks.Task Delay(System.TimeSpan delay, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task Delay(int millisecondsDelay, System.Threading.CancellationToken cancellationToken); } public interface IThread : Testably.Abstractions.TimeSystem.ITimeSystemEntity { - void Sleep(int millisecondsTimeout); void Sleep(System.TimeSpan timeout); + void Sleep(int millisecondsTimeout); } public interface ITimeSystemEntity { @@ -96,17 +96,17 @@ namespace Testably.Abstractions.TimeSystem } public interface ITimer : System.IDisposable, Testably.Abstractions.TimeSystem.ITimeSystemEntity { + bool Change(System.TimeSpan dueTime, System.TimeSpan period); bool Change(int dueTime, int period); bool Change(long dueTime, long period); - bool Change(System.TimeSpan dueTime, System.TimeSpan period); bool Dispose(System.Threading.WaitHandle notifyObject); } public interface ITimerFactory : Testably.Abstractions.TimeSystem.ITimeSystemEntity { Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback); + Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback, object? state, System.TimeSpan dueTime, System.TimeSpan period); Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback, object? state, int dueTime, int period); Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback, object? state, long dueTime, long period); - Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback, object? state, System.TimeSpan dueTime, System.TimeSpan period); Testably.Abstractions.TimeSystem.ITimer Wrap(System.Threading.Timer timer); } } \ No newline at end of file diff --git a/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.Interface_netstandard2.1.txt b/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.Interface_netstandard2.1.txt index 4815c46f2..6ecb287a4 100644 --- a/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.Interface_netstandard2.1.txt +++ b/Tests/Api/Testably.Abstractions.Core.Api.Tests/Expected/Testably.Abstractions.Interface_netstandard2.1.txt @@ -30,8 +30,8 @@ namespace Testably.Abstractions.Helpers public int Next() { } public int Next(int maxValue) { } public int Next(int minValue, int maxValue) { } - public void NextBytes(byte[] buffer) { } public void NextBytes(System.Span buffer) { } + public void NextBytes(byte[] buffer) { } public double NextDouble() { } } } @@ -70,8 +70,8 @@ namespace Testably.Abstractions.RandomSystem int Next(); int Next(int maxValue); int Next(int minValue, int maxValue); - void NextBytes(byte[] buffer); void NextBytes(System.Span buffer); + void NextBytes(byte[] buffer); double NextDouble(); } public interface IRandomFactory : Testably.Abstractions.RandomSystem.IRandomSystemEntity @@ -98,15 +98,15 @@ namespace Testably.Abstractions.TimeSystem } public interface ITask : Testably.Abstractions.TimeSystem.ITimeSystemEntity { - System.Threading.Tasks.Task Delay(int millisecondsDelay); System.Threading.Tasks.Task Delay(System.TimeSpan delay); - System.Threading.Tasks.Task Delay(int millisecondsDelay, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task Delay(int millisecondsDelay); System.Threading.Tasks.Task Delay(System.TimeSpan delay, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task Delay(int millisecondsDelay, System.Threading.CancellationToken cancellationToken); } public interface IThread : Testably.Abstractions.TimeSystem.ITimeSystemEntity { - void Sleep(int millisecondsTimeout); void Sleep(System.TimeSpan timeout); + void Sleep(int millisecondsTimeout); } public interface ITimeSystemEntity { @@ -114,17 +114,17 @@ namespace Testably.Abstractions.TimeSystem } public interface ITimer : System.IAsyncDisposable, System.IDisposable, Testably.Abstractions.TimeSystem.ITimeSystemEntity { + bool Change(System.TimeSpan dueTime, System.TimeSpan period); bool Change(int dueTime, int period); bool Change(long dueTime, long period); - bool Change(System.TimeSpan dueTime, System.TimeSpan period); bool Dispose(System.Threading.WaitHandle notifyObject); } public interface ITimerFactory : Testably.Abstractions.TimeSystem.ITimeSystemEntity { Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback); + Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback, object? state, System.TimeSpan dueTime, System.TimeSpan period); Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback, object? state, int dueTime, int period); Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback, object? state, long dueTime, long period); - Testably.Abstractions.TimeSystem.ITimer New(System.Threading.TimerCallback callback, object? state, System.TimeSpan dueTime, System.TimeSpan period); Testably.Abstractions.TimeSystem.ITimer Wrap(System.Threading.Timer timer); } } \ No newline at end of file