Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
<ItemGroup>
<PackageVersion Include="AutoFixture.AutoNSubstitute" Version="5.0.0-preview0012"/>
<PackageVersion Include="AutoFixture.Xunit3" Version="5.0.0-preview0012"/>
<PackageVersion Include="aweXpect" Version="0.24.0-DEV.2"/>
<PackageVersion Include="aweXpect.Testably" Version="0.5.0-pre.1"/>
<PackageVersion Include="aweXpect" Version="1.6.0"/>
<PackageVersion Include="aweXpect.Testably" Version="0.7.0"/>
<PackageVersion Include="FluentAssertions" Version="7.2.0"/>
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0"/>
<PackageVersion Include="xunit.v3" Version="1.1.0"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ await That(exception).IsNull().Because(
case MethodType.GetAccessControl:
await That(exception).Is<DirectoryNotFoundException>()
.Because($"\n{exceptionType} on {baseType}\n was called with a missing directory")
.Which(e => e.HResult, h => h.IsEqualTo(-2147024893));
.Whose(e => e.HResult, h => h.IsEqualTo(-2147024893));
break;
case MethodType.SetAccessControl:
await That(exception).IsNull()
Expand Down Expand Up @@ -68,7 +68,7 @@ await That(exception).IsNull()
case MethodType.GetAccessControl:
await That(exception).Is<DirectoryNotFoundException>()
.Because($"\n{exceptionType} on {baseType}\n was called with a missing file")
.Which(e => e.HResult, h => h.IsEqualTo(-2147024893));
.Whose(e => e.HResult, h => h.IsEqualTo(-2147024893));
break;
case MethodType.SetAccessControl:
await That(exception).IsNull()
Expand Down Expand Up @@ -99,12 +99,12 @@ public async Task FileOperations_WhenDirectoryIsMissing_ShouldThrowDirectoryNotF
case MethodType.Create:
await That(exception).Is<UnauthorizedAccessException>()
.Because($"\n{exceptionType} on {baseType}\n was called with a missing directory")
.Which(e => e.HResult, h => h.IsEqualTo(-2147024891));
.Whose(e => e.HResult, h => h.IsEqualTo(-2147024891));
break;
case MethodType.GetAccessControl:
await That(exception).Is<FileNotFoundException>()
.Because($"\n{exceptionType} on {baseType}\n was called with a missing directory")
.Which(e => e.HResult, h => h.IsEqualTo(-2147024894));
.Whose(e => e.HResult, h => h.IsEqualTo(-2147024894));
break;
case MethodType.SetAccessControl:
await That(exception).IsNull()
Expand Down Expand Up @@ -139,7 +139,7 @@ await That(exception).IsNull()
case MethodType.GetAccessControl:
await That(exception).Is<FileNotFoundException>()
.Because($"\n{exceptionType} on {baseType}\n was called with a missing file")
.Which(e => e.HResult, h => h.IsEqualTo(-2147024894));
.Whose(e => e.HResult, h => h.IsEqualTo(-2147024894));
break;
case MethodType.SetAccessControl:
await That(exception).IsNull()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ void Act()
await That(Act).Throws<IOException>()
.WithMessage($"*'{FileSystem.Path.GetFullPath("bar/foo.txt")}'*").AsWildcard();
await That(FileSystem).HasFile("bar/foo.txt")
.WhichContent(c => c.IsNotEqualTo("FooFooFoo"));
.WhoseContent(c => c.IsNotEqualTo("FooFooFoo"));
}

#if FEATURE_COMPRESSION_ADVANCED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ void Act()
await That(Act).Throws<IOException>()
.WithMessage($"*'{FileSystem.Path.GetFullPath("bar/bar.txt")}'*").AsWildcard();
await That(FileSystem).HasFile("bar/bar.txt")
.WhichContent(f => f.IsNotEqualTo("FooFooFoo"));
.WhoseContent(f => f.IsNotEqualTo("FooFooFoo"));
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public async Task New_ShouldOpenWithReadMode()
IZipArchive archive = FileSystem.ZipArchive().New(stream);

await That(archive.Mode).IsEqualTo(ZipArchiveMode.Read);
await That(archive.Entries).Has().Exactly(1).Items();
await That(archive.Entries).HasCount().EqualTo(1);
}

[Fact]
Expand Down Expand Up @@ -62,7 +62,7 @@ public async Task New_UpdateMode_ShouldOpenArchive()
IZipArchive archive = FileSystem.ZipArchive().New(stream, ZipArchiveMode.Update);

await That(archive.Mode).IsEqualTo(ZipArchiveMode.Update);
await That(archive.Entries).Has().Exactly(1).Items();
await That(archive.Entries).HasCount().EqualTo(1);
}

[Theory]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public async Task Open_ShouldOpenExistingArchive(ZipArchiveMode mode)
IZipArchive archive = FileSystem.ZipFile().Open("destination.zip", mode);

await That(archive.Mode).IsEqualTo(mode);
await That(archive.Entries).Has().Exactly(1).Items();
await That(archive.Entries).HasCount().EqualTo(1);
}

[Fact]
Expand All @@ -58,6 +58,6 @@ public async Task OpenRead_ShouldOpenExistingArchiveInReadMode()
IZipArchive archive = FileSystem.ZipFile().OpenRead("destination.zip");

await That(archive.Mode).IsEqualTo(ZipArchiveMode.Read);
await That(archive.Entries).Has().Exactly(1).Items();
await That(archive.Entries).HasCount().EqualTo(1);
}
}
Loading