diff --git a/Source/_Tests/AudibleUtilities.Tests/AccountTests.cs b/Source/_Tests/AudibleUtilities.Tests/AccountTests.cs index 03309832..f45a850f 100644 --- a/Source/_Tests/AudibleUtilities.Tests/AccountTests.cs +++ b/Source/_Tests/AudibleUtilities.Tests/AccountTests.cs @@ -528,7 +528,7 @@ namespace AccountsTests var a2 = new Account("a") { AccountName = "two", IdentityTokens = idIn }; // violation: validate() - Assert.ThrowsException(() => accountsSettings.Add(a2)); + Assert.ThrowsExactly(() => accountsSettings.Add(a2)); } [TestMethod] @@ -545,7 +545,7 @@ namespace AccountsTests accountsSettings.Add(a2); // violation: GetAccount.SingleOrDefault - Assert.ThrowsException(() => a2.IdentityTokens = idIn); + Assert.ThrowsExactly(() => a2.IdentityTokens = idIn); } } diff --git a/Source/_Tests/FileManager.Tests/FileUtilityTests.cs b/Source/_Tests/FileManager.Tests/FileUtilityTests.cs index ff0e9f58..0b3dcafc 100644 --- a/Source/_Tests/FileManager.Tests/FileUtilityTests.cs +++ b/Source/_Tests/FileManager.Tests/FileUtilityTests.cs @@ -17,7 +17,7 @@ namespace FileUtilityTests static readonly ReplacementCharacters Barebones = ReplacementCharacters.Barebones(Environment.OSVersion.Platform == PlatformID.Win32NT); [TestMethod] - public void null_path_throws() => Assert.ThrowsException(() => FileUtility.GetSafePath(null, Default)); + public void null_path_throws() => Assert.ThrowsExactly(() => FileUtility.GetSafePath(null, Default)); [TestMethod] // non-empty replacement @@ -137,25 +137,25 @@ namespace FileUtilityTests public class GetSequenceFormatted { [TestMethod] - public void negative_partsPosition() => Assert.ThrowsException(() + public void negative_partsPosition() => Assert.ThrowsExactly(() => FileUtility.GetSequenceFormatted(-1, 2) ); [TestMethod] - public void zero_partsPosition() => Assert.ThrowsException(() + public void zero_partsPosition() => Assert.ThrowsExactly(() => FileUtility.GetSequenceFormatted(0, 2) ); [TestMethod] - public void negative_partsTotal() => Assert.ThrowsException(() + public void negative_partsTotal() => Assert.ThrowsExactly(() => FileUtility.GetSequenceFormatted(2, -1) ); [TestMethod] - public void zero_partsTotal() => Assert.ThrowsException(() + public void zero_partsTotal() => Assert.ThrowsExactly(() => FileUtility.GetSequenceFormatted(2, 0) ); [TestMethod] - public void partsPosition_greater_than_partsTotal() => Assert.ThrowsException(() + public void partsPosition_greater_than_partsTotal() => Assert.ThrowsExactly(() => FileUtility.GetSequenceFormatted(2, 1) );