diff --git a/Directory.Packages.props b/Directory.Packages.props
index 6695349ea..5a7ae39f4 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -22,7 +22,7 @@
-
+
diff --git a/tests/TestableIO.System.IO.Abstractions.Wrappers.Tests/FileSystemTests.cs b/tests/TestableIO.System.IO.Abstractions.Wrappers.Tests/FileSystemTests.cs
index 7a99d2086..d64616dea 100644
--- a/tests/TestableIO.System.IO.Abstractions.Wrappers.Tests/FileSystemTests.cs
+++ b/tests/TestableIO.System.IO.Abstractions.Wrappers.Tests/FileSystemTests.cs
@@ -26,88 +26,88 @@ await That(memoryStream).HasLength().GreaterThan(0)
[Test]
public async Task Mock_File_Succeeds()
{
- var fileSystemMock = Mock.Create(fs =>
- fs.Property.File.InitializeWith(Mock.Create()));
+ var fileSystemMock = IFileSystem.CreateMock(fs =>
+ fs.File.InitializeWith(IFile.CreateMock()));
await That(() =>
- fileSystemMock.File.SetupMock.Method.ReadAllText(It.IsAny()).Returns("")
+ fileSystemMock.File.Mock.Setup.ReadAllText(It.IsAny()).Returns("")
).DoesNotThrow();
}
[Test]
public async Task Mock_Directory_Succeeds()
{
- var fileSystemMock = Mock.Create(fs =>
- fs.Property.Directory.InitializeWith(Mock.Create()));
+ var fileSystemMock = IFileSystem.CreateMock(fs =>
+ fs.Directory.InitializeWith(IDirectory.CreateMock()));
await That(() =>
- fileSystemMock.Directory.SetupMock.Method.CreateDirectory(It.IsAny())
+ fileSystemMock.Directory.Mock.Setup.CreateDirectory(It.IsAny())
).DoesNotThrow();
}
[Test]
public async Task Mock_FileInfo_Succeeds()
{
- var fileSystemMock = Mock.Create(fs =>
- fs.Property.FileInfo.InitializeWith(Mock.Create()));
+ var fileSystemMock = IFileSystem.CreateMock(fs =>
+ fs.FileInfo.InitializeWith(IFileInfoFactory.CreateMock()));
await That(() =>
- fileSystemMock.FileInfo.SetupMock.Method.New(It.IsAny())
+ fileSystemMock.FileInfo.Mock.Setup.New(It.IsAny())
).DoesNotThrow();
}
[Test]
public async Task Mock_FileStream_Succeeds()
{
- var fileSystemMock = Mock.Create(fs =>
- fs.Property.FileStream.InitializeWith(Mock.Create()));
+ var fileSystemMock = IFileSystem.CreateMock(fs =>
+ fs.FileStream.InitializeWith(IFileStreamFactory.CreateMock()));
await That(() =>
- fileSystemMock.FileStream.SetupMock.Method.New(It.IsAny(), It.IsAny())
+ fileSystemMock.FileStream.Mock.Setup.New(It.IsAny(), It.IsAny())
).DoesNotThrow();
}
[Test]
public async Task Mock_Path_Succeeds()
{
- var fileSystemMock = Mock.Create(fs =>
- fs.Property.Path.InitializeWith(Mock.Create()));
+ var fileSystemMock = IFileSystem.CreateMock(fs =>
+ fs.Path.InitializeWith(IPath.CreateMock()));
await That(() =>
- fileSystemMock.Path.SetupMock.Method.Combine(It.IsAny(), It.IsAny())
+ fileSystemMock.Path.Mock.Setup.Combine(It.IsAny(), It.IsAny())
).DoesNotThrow();
}
[Test]
public async Task Mock_DirectoryInfo_Succeeds()
{
- var fileSystemMock = Mock.Create(fs =>
- fs.Property.DirectoryInfo.InitializeWith(Mock.Create()));
+ var fileSystemMock = IFileSystem.CreateMock(fs =>
+ fs.DirectoryInfo.InitializeWith(IDirectoryInfoFactory.CreateMock()));
await That(() =>
- fileSystemMock.DirectoryInfo.SetupMock.Method.New(It.IsAny())
+ fileSystemMock.DirectoryInfo.Mock.Setup.New(It.IsAny())
).DoesNotThrow();
}
[Test]
public async Task Mock_DriveInfo_Succeeds()
{
- var fileSystemMock = Mock.Create(fs =>
- fs.Property.DriveInfo.InitializeWith(Mock.Create()));
+ var fileSystemMock = IFileSystem.CreateMock(fs =>
+ fs.DriveInfo.InitializeWith(IDriveInfoFactory.CreateMock()));
await That(() =>
- fileSystemMock.DriveInfo.SetupMock.Method.New(It.IsAny())
+ fileSystemMock.DriveInfo.Mock.Setup.New(It.IsAny())
).DoesNotThrow();
}
[Test]
public async Task Mock_FileSystemWatcher_Succeeds()
{
- var fileSystemMock = Mock.Create(fs =>
- fs.Property.FileSystemWatcher.InitializeWith(Mock.Create()));
+ var fileSystemMock = IFileSystem.CreateMock(fs =>
+ fs.FileSystemWatcher.InitializeWith(IFileSystemWatcherFactory.CreateMock()));
await That(() =>
- fileSystemMock.FileSystemWatcher.SetupMock.Method.New(It.IsAny())
+ fileSystemMock.FileSystemWatcher.Mock.Setup.New(It.IsAny())
).DoesNotThrow();
}
}
\ No newline at end of file