-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathTestably.Abstractions.Testing_net7.0.txt
388 lines (388 loc) · 26.9 KB
/
Testably.Abstractions.Testing_net7.0.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
[assembly: System.CLSCompliant(true)]
[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/Testably/Testably.Abstractions.git")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Testably.Abstractions.Testing.Tests")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Testably.Abstractions.Tests")]
[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v7.0", FrameworkDisplayName=".NET 7.0")]
namespace Testably.Abstractions.Testing.FileSystem
{
public class ChangeDescription
{
public System.IO.WatcherChangeTypes ChangeType { get; }
public Testably.Abstractions.Testing.FileSystemTypes FileSystemType { get; }
public string? Name { get; }
public System.IO.NotifyFilters NotifyFilters { get; }
public string? OldName { get; }
public string? OldPath { get; }
public string Path { get; }
public override string ToString() { }
}
public class DefaultAccessControlStrategy : Testably.Abstractions.Testing.FileSystem.IAccessControlStrategy
{
public DefaultAccessControlStrategy(System.Func<string, Testably.Abstractions.Helpers.IFileSystemExtensibility, bool> callback) { }
public bool IsAccessGranted(string fullPath, Testably.Abstractions.Helpers.IFileSystemExtensibility extensibility) { }
}
public class DefaultSafeFileHandleStrategy : Testably.Abstractions.Testing.FileSystem.ISafeFileHandleStrategy
{
public DefaultSafeFileHandleStrategy(System.Func<Microsoft.Win32.SafeHandles.SafeFileHandle, Testably.Abstractions.Testing.FileSystem.SafeFileHandleMock> callback) { }
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage(Justification="SafeFileHandle cannot be unit tested.")]
public Testably.Abstractions.Testing.FileSystem.SafeFileHandleMock MapSafeFileHandle(Microsoft.Win32.SafeHandles.SafeFileHandle fileHandle) { }
}
public interface IAccessControlStrategy
{
bool IsAccessGranted(string fullPath, Testably.Abstractions.Helpers.IFileSystemExtensibility extensibility);
}
public interface IInterceptionHandler : System.IO.Abstractions.IFileSystemEntity
{
Testably.Abstractions.Testing.MockFileSystem Event(System.Action<Testably.Abstractions.Testing.FileSystem.ChangeDescription> interceptionCallback, System.Func<Testably.Abstractions.Testing.FileSystem.ChangeDescription, bool>? predicate = null);
}
public interface INotificationHandler : System.IO.Abstractions.IFileSystemEntity
{
Testably.Abstractions.Testing.Notification.IAwaitableCallback<Testably.Abstractions.Testing.FileSystem.ChangeDescription> OnEvent(System.Action<Testably.Abstractions.Testing.FileSystem.ChangeDescription>? notificationCallback = null, System.Func<Testably.Abstractions.Testing.FileSystem.ChangeDescription, bool>? predicate = null);
}
public interface ISafeFileHandleStrategy
{
Testably.Abstractions.Testing.FileSystem.SafeFileHandleMock MapSafeFileHandle(Microsoft.Win32.SafeHandles.SafeFileHandle fileHandle);
}
public class NullAccessControlStrategy : Testably.Abstractions.Testing.FileSystem.IAccessControlStrategy
{
public NullAccessControlStrategy() { }
public bool IsAccessGranted(string fullPath, Testably.Abstractions.Helpers.IFileSystemExtensibility extensibility) { }
}
public class NullSafeFileHandleStrategy : Testably.Abstractions.Testing.FileSystem.ISafeFileHandleStrategy
{
public NullSafeFileHandleStrategy() { }
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage(Justification="SafeFileHandle cannot be unit tested.")]
public Testably.Abstractions.Testing.FileSystem.SafeFileHandleMock MapSafeFileHandle(Microsoft.Win32.SafeHandles.SafeFileHandle fileHandle) { }
}
public class SafeFileHandleMock
{
public SafeFileHandleMock(string path, System.IO.FileMode mode = 3, System.IO.FileShare share = 0) { }
public System.IO.FileMode Mode { get; }
public string Path { get; }
public System.IO.FileShare Share { get; }
}
}
namespace Testably.Abstractions.Testing
{
public static class FileSystemInitializerExtensions
{
public static Testably.Abstractions.Testing.Initializer.IFileSystemInitializer<TFileSystem> Initialize<TFileSystem>(this TFileSystem fileSystem, System.Action<Testably.Abstractions.Testing.FileSystemInitializerOptions>? options = null)
where TFileSystem : System.IO.Abstractions.IFileSystem { }
public static void InitializeEmbeddedResourcesFromAssembly(this System.IO.Abstractions.IFileSystem fileSystem, string directoryPath, System.Reflection.Assembly assembly, string? relativePath = null, string searchPattern = "*", System.IO.SearchOption searchOption = 1) { }
public static Testably.Abstractions.Testing.Initializer.IFileSystemInitializer<TFileSystem> InitializeIn<TFileSystem>(this TFileSystem fileSystem, string basePath, System.Action<Testably.Abstractions.Testing.FileSystemInitializerOptions>? options = null)
where TFileSystem : System.IO.Abstractions.IFileSystem { }
public static Testably.Abstractions.Testing.Initializer.IDirectoryCleaner SetCurrentDirectoryToEmptyTemporaryDirectory(this System.IO.Abstractions.IFileSystem fileSystem, string? prefix = null, System.Action<string>? logger = null) { }
}
public class FileSystemInitializerOptions
{
public FileSystemInitializerOptions() { }
public bool InitializeTempDirectory { get; set; }
}
[System.Flags]
public enum FileSystemTypes
{
Directory = 1,
File = 2,
DirectoryOrFile = 3,
}
public static class InterceptionHandlerExtensions
{
public static Testably.Abstractions.Testing.MockFileSystem Changing(this Testably.Abstractions.Testing.FileSystem.IInterceptionHandler handler, Testably.Abstractions.Testing.FileSystemTypes fileSystemType, System.Action<Testably.Abstractions.Testing.FileSystem.ChangeDescription> interceptionCallback, string path = "", string searchPattern = "*", System.Func<Testably.Abstractions.Testing.FileSystem.ChangeDescription, bool>? predicate = null) { }
public static Testably.Abstractions.Testing.MockFileSystem Creating(this Testably.Abstractions.Testing.FileSystem.IInterceptionHandler handler, Testably.Abstractions.Testing.FileSystemTypes fileSystemType, System.Action<Testably.Abstractions.Testing.FileSystem.ChangeDescription> interceptionCallback, string path = "", string searchPattern = "*", System.Func<Testably.Abstractions.Testing.FileSystem.ChangeDescription, bool>? predicate = null) { }
public static Testably.Abstractions.Testing.MockFileSystem Deleting(this Testably.Abstractions.Testing.FileSystem.IInterceptionHandler handler, Testably.Abstractions.Testing.FileSystemTypes fileSystemType, System.Action<Testably.Abstractions.Testing.FileSystem.ChangeDescription> interceptionCallback, string path = "", string searchPattern = "*", System.Func<Testably.Abstractions.Testing.FileSystem.ChangeDescription, bool>? predicate = null) { }
}
public sealed class MockFileSystem : System.IO.Abstractions.IFileSystem
{
public MockFileSystem() { }
public System.IO.Abstractions.IDirectory Directory { get; }
public System.IO.Abstractions.IDirectoryInfoFactory DirectoryInfo { get; }
public System.IO.Abstractions.IDriveInfoFactory DriveInfo { get; }
public System.IO.Abstractions.IFile File { get; }
public System.IO.Abstractions.IFileInfoFactory FileInfo { get; }
public System.IO.Abstractions.IFileStreamFactory FileStream { get; }
public System.IO.Abstractions.IFileSystemWatcherFactory FileSystemWatcher { get; }
public Testably.Abstractions.Testing.FileSystem.IInterceptionHandler Intercept { get; }
public Testably.Abstractions.Testing.FileSystem.INotificationHandler Notify { get; }
public System.IO.Abstractions.IPath Path { get; }
public Testably.Abstractions.IRandomSystem RandomSystem { get; }
public Testably.Abstractions.Testing.SimulationMode SimulationMode { get; }
public Testably.Abstractions.Testing.Statistics.IFileSystemStatistics Statistics { get; }
public Testably.Abstractions.ITimeSystem TimeSystem { get; }
public override string ToString() { }
public Testably.Abstractions.Testing.MockFileSystem WithAccessControlStrategy(Testably.Abstractions.Testing.FileSystem.IAccessControlStrategy accessControlStrategy) { }
public Testably.Abstractions.Testing.MockFileSystem WithDrive(string? drive, System.Action<Testably.Abstractions.Testing.Storage.IStorageDrive>? driveCallback = null) { }
public Testably.Abstractions.Testing.MockFileSystem WithSafeFileHandleStrategy(Testably.Abstractions.Testing.FileSystem.ISafeFileHandleStrategy safeFileHandleStrategy) { }
}
public static class MockFileSystemExtensions
{
public static System.IO.Abstractions.IDriveInfo GetDefaultDrive(this Testably.Abstractions.Testing.MockFileSystem mockFileSystem) { }
public static Testably.Abstractions.Testing.MockFileSystem WithDrive(this Testably.Abstractions.Testing.MockFileSystem mockFileSystem, System.Action<Testably.Abstractions.Testing.Storage.IStorageDrive> driveCallback) { }
public static Testably.Abstractions.Testing.MockFileSystem WithUncDrive(this Testably.Abstractions.Testing.MockFileSystem mockFileSystem, string server, System.Action<Testably.Abstractions.Testing.Storage.IStorageDrive>? driveCallback = null) { }
}
public sealed class MockRandomSystem : Testably.Abstractions.IRandomSystem
{
public MockRandomSystem() { }
public MockRandomSystem(Testably.Abstractions.Testing.RandomSystem.IRandomProvider randomProvider) { }
public Testably.Abstractions.RandomSystem.IGuid Guid { get; }
public Testably.Abstractions.RandomSystem.IRandomFactory Random { get; }
public Testably.Abstractions.Testing.RandomSystem.IRandomProvider RandomProvider { get; }
public override string ToString() { }
}
public sealed class MockTimeSystem : Testably.Abstractions.ITimeSystem
{
public MockTimeSystem() { }
public MockTimeSystem(System.DateTime time) { }
public MockTimeSystem(Testably.Abstractions.Testing.TimeSystem.ITimeProvider timeProvider) { }
public Testably.Abstractions.TimeSystem.IDateTime DateTime { get; }
public Testably.Abstractions.Testing.TimeSystem.INotificationHandler On { get; }
public Testably.Abstractions.TimeSystem.ITask Task { get; }
public Testably.Abstractions.TimeSystem.IThread Thread { get; }
public Testably.Abstractions.Testing.TimeSystem.ITimeProvider TimeProvider { get; }
public Testably.Abstractions.TimeSystem.ITimerFactory Timer { get; }
public Testably.Abstractions.Testing.TimeSystem.ITimerHandler TimerHandler { get; }
public override string ToString() { }
public Testably.Abstractions.Testing.MockTimeSystem WithTimerStrategy(Testably.Abstractions.Testing.TimeSystem.ITimerStrategy timerStrategy) { }
}
public static class Notification
{
public static Testably.Abstractions.Testing.Notification.IAwaitableCallback<TValue> ExecuteWhileWaiting<TValue>(this Testably.Abstractions.Testing.Notification.IAwaitableCallback<TValue> awaitable, System.Action callback) { }
public static Testably.Abstractions.Testing.Notification.IAwaitableCallback<TValue, TFunc> ExecuteWhileWaiting<TValue, TFunc>(this Testably.Abstractions.Testing.Notification.IAwaitableCallback<TValue> awaitable, System.Func<TFunc> callback) { }
public interface IAwaitableCallback<out TValue> : System.IDisposable
{
void Wait(System.Func<TValue, bool>? filter = null, int timeout = 30000, int count = 1, System.Action? executeWhenWaiting = null);
}
public interface IAwaitableCallback<out TValue, out TFunc> : System.IDisposable, Testably.Abstractions.Testing.Notification.IAwaitableCallback<TValue>
{
TFunc Wait(System.Func<TValue, bool>? filter = null, int timeout = 30000, int count = 1, System.Action? executeWhenWaiting = null);
}
}
public static class NotificationHandlerExtensions
{
public static Testably.Abstractions.Testing.Notification.IAwaitableCallback<Testably.Abstractions.Testing.FileSystem.ChangeDescription> OnChanged(this Testably.Abstractions.Testing.FileSystem.INotificationHandler handler, Testably.Abstractions.Testing.FileSystemTypes fileSystemType, System.Action<Testably.Abstractions.Testing.FileSystem.ChangeDescription>? notificationCallback = null, string path = "", string searchPattern = "*", System.Func<Testably.Abstractions.Testing.FileSystem.ChangeDescription, bool>? predicate = null) { }
public static Testably.Abstractions.Testing.Notification.IAwaitableCallback<Testably.Abstractions.Testing.FileSystem.ChangeDescription> OnCreated(this Testably.Abstractions.Testing.FileSystem.INotificationHandler handler, Testably.Abstractions.Testing.FileSystemTypes fileSystemType, System.Action<Testably.Abstractions.Testing.FileSystem.ChangeDescription>? notificationCallback = null, string path = "", string searchPattern = "*", System.Func<Testably.Abstractions.Testing.FileSystem.ChangeDescription, bool>? predicate = null) { }
public static Testably.Abstractions.Testing.Notification.IAwaitableCallback<Testably.Abstractions.Testing.FileSystem.ChangeDescription> OnDeleted(this Testably.Abstractions.Testing.FileSystem.INotificationHandler handler, Testably.Abstractions.Testing.FileSystemTypes fileSystemType, System.Action<Testably.Abstractions.Testing.FileSystem.ChangeDescription>? notificationCallback = null, string path = "", string searchPattern = "*", System.Func<Testably.Abstractions.Testing.FileSystem.ChangeDescription, bool>? predicate = null) { }
}
public static class RandomProvider
{
public static Testably.Abstractions.Testing.RandomSystem.IRandomProvider Default() { }
public static Testably.Abstractions.Testing.RandomSystem.IRandomProvider Generate(int seed = -1, Testably.Abstractions.Testing.RandomProvider.Generator<System.Guid>? guidGenerator = null, Testably.Abstractions.Testing.RandomProvider.Generator<int>? intGenerator = null, Testably.Abstractions.Testing.RandomProvider.Generator<long>? longGenerator = null, Testably.Abstractions.Testing.RandomProvider.Generator<float>? singleGenerator = null, Testably.Abstractions.Testing.RandomProvider.Generator<double>? doubleGenerator = null, Testably.Abstractions.Testing.RandomProvider.Generator<byte[]>? byteGenerator = null) { }
public abstract class Generator
{
protected Generator() { }
public static Testably.Abstractions.Testing.RandomProvider.Generator<T> FromArray<T>(T[] values) { }
public static Testably.Abstractions.Testing.RandomProvider.Generator<T> FromCallback<T>(System.Func<T> callback) { }
public static Testably.Abstractions.Testing.RandomProvider.Generator<T> FromEnumerable<T>(System.Collections.Generic.IEnumerable<T> enumerable) { }
public static Testably.Abstractions.Testing.RandomProvider.Generator<T> FromValue<T>(T value) { }
}
public sealed class Generator<T> : Testably.Abstractions.Testing.RandomProvider.Generator, System.IDisposable
{
public void Dispose() { }
public T GetNext() { }
public static Testably.Abstractions.Testing.RandomProvider.Generator<T> op_Implicit(System.Func<T> callback) { }
public static Testably.Abstractions.Testing.RandomProvider.Generator<T> op_Implicit(T value) { }
public static Testably.Abstractions.Testing.RandomProvider.Generator<T> op_Implicit(T[] values) { }
}
}
public enum SimulationMode
{
Native = 0,
Linux = 1,
MacOS = 2,
Windows = 3,
}
public static class TimeProvider
{
public static Testably.Abstractions.Testing.TimeSystem.ITimeProvider Now() { }
public static Testably.Abstractions.Testing.TimeSystem.ITimeProvider Random() { }
public static Testably.Abstractions.Testing.TimeSystem.ITimeProvider Use(System.DateTime time) { }
}
}
namespace Testably.Abstractions.Testing.Initializer
{
public class DirectoryDescription : Testably.Abstractions.Testing.Initializer.FileSystemInfoDescription
{
public DirectoryDescription(string name) { }
public DirectoryDescription(string name, params Testably.Abstractions.Testing.Initializer.FileSystemInfoDescription[] children) { }
public Testably.Abstractions.Testing.Initializer.FileSystemInfoDescription[] Children { get; }
public override Testably.Abstractions.Testing.Initializer.FileSystemInfoDescription this[string path] { get; }
}
public class FileDescription : Testably.Abstractions.Testing.Initializer.FileSystemInfoDescription
{
public FileDescription(string name, byte[] bytes) { }
public FileDescription(string name, string? content = null) { }
public byte[]? Bytes { get; }
public string? Content { get; }
public bool IsReadOnly { get; set; }
public override Testably.Abstractions.Testing.Initializer.FileSystemInfoDescription this[string? path] { get; }
}
public abstract class FileSystemInfoDescription
{
protected FileSystemInfoDescription(string name) { }
public abstract Testably.Abstractions.Testing.Initializer.FileSystemInfoDescription this[string path] { get; }
public string Name { get; }
}
public interface IDirectoryCleaner : System.IDisposable
{
string BasePath { get; }
}
public interface IFileManipulator : System.IO.Abstractions.IFileSystemEntity
{
System.IO.Abstractions.IFileInfo File { get; }
Testably.Abstractions.Testing.Initializer.IFileManipulator HasBytesContent(byte[] bytes);
Testably.Abstractions.Testing.Initializer.IFileManipulator HasStringContent(string contents);
}
public interface IFileSystemDirectoryInitializer<out TFileSystem> : Testably.Abstractions.Testing.Initializer.IFileSystemInitializer<TFileSystem>
where out TFileSystem : System.IO.Abstractions.IFileSystem
{
System.IO.Abstractions.IDirectoryInfo Directory { get; }
Testably.Abstractions.Testing.Initializer.IFileSystemDirectoryInitializer<TFileSystem> Initialized(System.Action<Testably.Abstractions.Testing.Initializer.IFileSystemInitializer<TFileSystem>> subdirectoryInitializer);
}
public interface IFileSystemFileInitializer<out TFileSystem> : Testably.Abstractions.Testing.Initializer.IFileSystemInitializer<TFileSystem>
where out TFileSystem : System.IO.Abstractions.IFileSystem
{
System.IO.Abstractions.IFileInfo File { get; }
Testably.Abstractions.Testing.Initializer.IFileSystemFileInitializer<TFileSystem> Which(System.Action<Testably.Abstractions.Testing.Initializer.IFileManipulator> fileManipulation);
}
public interface IFileSystemInitializer<out TFileSystem>
where out TFileSystem : System.IO.Abstractions.IFileSystem
{
System.IO.Abstractions.IDirectoryInfo BaseDirectory { get; }
TFileSystem FileSystem { get; }
System.IO.Abstractions.IFileSystemInfo this[int index] { get; }
Testably.Abstractions.Testing.Initializer.IFileSystemInitializer<TFileSystem> With(params Testably.Abstractions.Testing.Initializer.FileSystemInfoDescription[] descriptions);
Testably.Abstractions.Testing.Initializer.IFileSystemInitializer<TFileSystem> With<TDescription>(TDescription[] descriptions)
where TDescription : Testably.Abstractions.Testing.Initializer.FileSystemInfoDescription;
Testably.Abstractions.Testing.Initializer.IFileSystemFileInitializer<TFileSystem> WithAFile(string? extension = null);
Testably.Abstractions.Testing.Initializer.IFileSystemDirectoryInitializer<TFileSystem> WithASubdirectory();
Testably.Abstractions.Testing.Initializer.IFileSystemFileInitializer<TFileSystem> WithFile(string fileName);
Testably.Abstractions.Testing.Initializer.IFileSystemInitializer<TFileSystem> WithSubdirectories(params string[] paths);
Testably.Abstractions.Testing.Initializer.IFileSystemDirectoryInitializer<TFileSystem> WithSubdirectory(string directoryName);
}
[System.Serializable]
public class TestingException : System.Exception
{
public TestingException(string message) { }
protected TestingException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
public TestingException(string message, System.Exception inner) { }
}
}
namespace Testably.Abstractions.Testing.RandomSystem
{
public interface IRandomProvider
{
System.Guid GetGuid();
Testably.Abstractions.RandomSystem.IRandom GetRandom(int seed = -1);
}
}
namespace Testably.Abstractions.Testing.Statistics
{
public interface IFileSystemStatistics
{
Testably.Abstractions.Testing.Statistics.IStatistics<System.IO.Abstractions.IDirectory> Directory { get; }
Testably.Abstractions.Testing.Statistics.IPathStatistics<System.IO.Abstractions.IDirectoryInfoFactory, System.IO.Abstractions.IDirectoryInfo> DirectoryInfo { get; }
Testably.Abstractions.Testing.Statistics.IPathStatistics<System.IO.Abstractions.IDriveInfoFactory, System.IO.Abstractions.IDriveInfo> DriveInfo { get; }
Testably.Abstractions.Testing.Statistics.IStatistics<System.IO.Abstractions.IFile> File { get; }
Testably.Abstractions.Testing.Statistics.IPathStatistics<System.IO.Abstractions.IFileInfoFactory, System.IO.Abstractions.IFileInfo> FileInfo { get; }
Testably.Abstractions.Testing.Statistics.IPathStatistics<System.IO.Abstractions.IFileStreamFactory, System.IO.Abstractions.FileSystemStream> FileStream { get; }
Testably.Abstractions.Testing.Statistics.IPathStatistics<System.IO.Abstractions.IFileSystemWatcherFactory, System.IO.Abstractions.IFileSystemWatcher> FileSystemWatcher { get; }
Testably.Abstractions.Testing.Statistics.IStatistics<System.IO.Abstractions.IPath> Path { get; }
}
public interface IPathStatistics<TFactory, TType> : Testably.Abstractions.Testing.Statistics.IStatistics, Testably.Abstractions.Testing.Statistics.IStatistics<TFactory>
{
Testably.Abstractions.Testing.Statistics.IStatistics<TType> this[string path] { get; }
}
public interface IStatistics
{
Testably.Abstractions.Testing.Statistics.MethodStatistic[] Methods { get; }
Testably.Abstractions.Testing.Statistics.PropertyStatistic[] Properties { get; }
}
public interface IStatistics<TType> : Testably.Abstractions.Testing.Statistics.IStatistics { }
public sealed class MethodStatistic
{
public int Counter { get; }
public string Name { get; }
public Testably.Abstractions.Testing.Statistics.ParameterDescription[] Parameters { get; }
public override string ToString() { }
}
public abstract class ParameterDescription
{
protected ParameterDescription(bool isOutParameter) { }
public bool IsOutParameter { get; }
public bool Is<T>(System.Func<T, bool> comparer) { }
public bool Is<T>(System.ReadOnlySpan<T> value) { }
public bool Is<T>(System.Span<T> value) { }
public bool Is<T>(T value) { }
public bool Is<T>(T[] value) { }
public static Testably.Abstractions.Testing.Statistics.ParameterDescription FromOutParameter<T>(T value) { }
public static Testably.Abstractions.Testing.Statistics.ParameterDescription FromParameter<T>(System.ReadOnlySpan<T> value) { }
public static Testably.Abstractions.Testing.Statistics.ParameterDescription FromParameter<T>(System.Span<T> value) { }
public static Testably.Abstractions.Testing.Statistics.ParameterDescription FromParameter<T>(T value) { }
}
public enum PropertyAccess
{
Get = 0,
Set = 1,
}
public sealed class PropertyStatistic
{
public Testably.Abstractions.Testing.Statistics.PropertyAccess Access { get; }
public int Counter { get; }
public string Name { get; }
public override string ToString() { }
}
}
namespace Testably.Abstractions.Testing.Storage
{
public interface IStorageDrive : System.IO.Abstractions.IDriveInfo, System.IO.Abstractions.IFileSystemEntity
{
bool IsUncPath { get; }
Testably.Abstractions.Testing.Storage.IStorageDrive ChangeUsedBytes(long usedBytesDelta);
Testably.Abstractions.Testing.Storage.IStorageDrive SetDriveFormat(string driveFormat = "NTFS");
Testably.Abstractions.Testing.Storage.IStorageDrive SetDriveType(System.IO.DriveType driveType = 3);
Testably.Abstractions.Testing.Storage.IStorageDrive SetIsReady(bool isReady = true);
Testably.Abstractions.Testing.Storage.IStorageDrive SetTotalSize(long totalSize = 1073741824);
}
}
namespace Testably.Abstractions.Testing.TimeSystem
{
public interface INotificationHandler
{
Testably.Abstractions.Testing.Notification.IAwaitableCallback<System.DateTime> DateTimeRead(System.Action<System.DateTime>? callback = null, System.Func<System.DateTime, bool>? predicate = null);
Testably.Abstractions.Testing.Notification.IAwaitableCallback<System.TimeSpan> TaskDelay(System.Action<System.TimeSpan>? callback = null, System.Func<System.TimeSpan, bool>? predicate = null);
Testably.Abstractions.Testing.Notification.IAwaitableCallback<System.TimeSpan> ThreadSleep(System.Action<System.TimeSpan>? callback = null, System.Func<System.TimeSpan, bool>? predicate = null);
}
public interface ITimeProvider
{
System.DateTime MaxValue { get; set; }
System.DateTime MinValue { get; set; }
System.DateTime UnixEpoch { get; set; }
void AdvanceBy(System.TimeSpan interval);
System.DateTime Read();
void SetTo(System.DateTime value);
}
public interface ITimerHandler
{
Testably.Abstractions.Testing.TimeSystem.ITimerMock this[int index] { get; }
}
public interface ITimerMock : System.IAsyncDisposable, System.IDisposable, Testably.Abstractions.TimeSystem.ITimeSystemEntity, Testably.Abstractions.TimeSystem.ITimer
{
Testably.Abstractions.Testing.TimeSystem.ITimerMock Wait(int executionCount = 1, int timeout = 10000, System.Action<Testably.Abstractions.Testing.TimeSystem.ITimerMock>? callback = null);
}
public interface ITimerStrategy
{
Testably.Abstractions.Testing.TimeSystem.TimerMode Mode { get; }
bool SwallowExceptions { get; }
}
public enum TimerMode
{
StartImmediately = 1,
StartOnMockWait = 2,
}
public class TimerStrategy : Testably.Abstractions.Testing.TimeSystem.ITimerStrategy
{
public TimerStrategy(Testably.Abstractions.Testing.TimeSystem.TimerMode mode = 1, bool swallowExceptions = false) { }
public Testably.Abstractions.Testing.TimeSystem.TimerMode Mode { get; }
public bool SwallowExceptions { get; }
public static Testably.Abstractions.Testing.TimeSystem.ITimerStrategy Default { get; }
}
}