diff --git a/X10D.Tests/src/IO/DirectoryInfoTests.cs b/X10D.Tests/src/IO/DirectoryInfoTests.cs index 375289d..be980ee 100644 --- a/X10D.Tests/src/IO/DirectoryInfoTests.cs +++ b/X10D.Tests/src/IO/DirectoryInfoTests.cs @@ -31,7 +31,7 @@ public class DirectoryInfoTests Assert.AreEqual(1, directory.GetFiles().Length); Assert.AreEqual(1, directory.GetDirectories().Length); - directory.Clear(false); + directory.Clear(); Assert.AreEqual(0, directory.GetFiles().Length); Assert.AreEqual(0, directory.GetDirectories().Length); Assert.IsTrue(directory.Exists); @@ -47,30 +47,17 @@ public class DirectoryInfoTests directory.Clear(); } - [TestMethod] - public void Clear_ShouldNotThrow_WhenThrowOnErrorIsFalse() - { - var directory = new DirectoryInfo(@"/@12#3"); - Assert.IsFalse(directory.Exists); - - directory.Clear(); - directory.Clear(false); - - Assert.IsTrue(true); // if this assertion passes, then the test passed - } - [TestMethod] public void Clear_ShouldThrowArgumentNullException_GivenNull() { Assert.ThrowsException(() => ((DirectoryInfo?)null)!.Clear()); - Assert.ThrowsException(() => ((DirectoryInfo?)null)!.Clear(true)); } [TestMethod] public void Clear_ShouldThrowDirectoryNotFoundException_GivenInvalidDirectory() { var directory = new DirectoryInfo(@"123:/@12#3"); - Assert.ThrowsException(() => directory.Clear(true)); + Assert.ThrowsException(() => directory.Clear()); } [TestMethod] @@ -78,6 +65,6 @@ public class DirectoryInfoTests { var directory = new DirectoryInfo(@"/@12#3"); Assert.IsFalse(directory.Exists); - Assert.ThrowsException(() => directory.Clear(true)); + Assert.ThrowsException(() => directory.Clear()); } }