diff --git a/ClosedXML_Tests/Excel/Misc/XLWorkbookTests.cs b/ClosedXML_Tests/Excel/Misc/XLWorkbookTests.cs index 2be3864..fcf53f9 100644 --- a/ClosedXML_Tests/Excel/Misc/XLWorkbookTests.cs +++ b/ClosedXML_Tests/Excel/Misc/XLWorkbookTests.cs @@ -289,7 +289,9 @@ wb.Protect("Abc@123"); Assert.IsTrue(wb.LockStructure); Assert.IsFalse(wb.LockWindows); - Assert.Catch(wb.Unprotect); + Assert.Throws(typeof(InvalidOperationException), delegate { wb.Protect(); }); + Assert.Throws(typeof(InvalidOperationException), delegate { wb.Unprotect(); }); + Assert.Throws(typeof(ArgumentException), delegate { wb.Unprotect("Cde@345"); }); } }