From 22f13f405d88d5459a704d9d9c5c45676c102162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Breu=C3=9F?= Date: Sun, 10 Sep 2023 15:24:41 +0200 Subject: [PATCH] fix: nullable warning from SonarCloud (#400) Fix incorrect nullable warning from SonarCloud: ![image](https://github.com/Testably/Testably.Abstractions/assets/3438234/63260aa9-2296-4e2c-9412-ad0121dd7e06) --- .../FileSystem/DirectoryInfo/Tests.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/Testably.Abstractions.Tests/FileSystem/DirectoryInfo/Tests.cs b/Tests/Testably.Abstractions.Tests/FileSystem/DirectoryInfo/Tests.cs index 90c270b7e..61b2d8ed1 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]