diff --git a/Tests/Testably.Abstractions.Tests/FileSystem/DirectoryInfo/Tests.cs b/Tests/Testably.Abstractions.Tests/FileSystem/DirectoryInfo/Tests.cs index 90c270b7..61b2d8ed 100644 --- a/Tests/Testably.Abstractions.Tests/FileSystem/DirectoryInfo/Tests.cs +++ b/Tests/Testably.Abstractions.Tests/FileSystem/DirectoryInfo/Tests.cs @@ -273,9 +273,9 @@ public void Parent_ArbitraryPaths_ShouldNotBeNull(string path1, IDirectoryInfo sut = FileSystem.DirectoryInfo.New(path); sut.Parent.Should().NotBeNull(); - sut.Parent!.Should().NotExist(); - sut.Parent.Parent.Should().NotBeNull(); - sut.Parent.Parent!.Should().NotExist(); + sut.Parent.Should().NotExist(); + sut.Parent?.Parent.Should().NotBeNull(); + sut.Parent?.Parent.Should().NotExist(); } [SkippableFact]