diff --git a/ClosedXML_Tests/ClosedXML_Tests.csproj b/ClosedXML_Tests/ClosedXML_Tests.csproj index dbc5325..0342658 100644 --- a/ClosedXML_Tests/ClosedXML_Tests.csproj +++ b/ClosedXML_Tests/ClosedXML_Tests.csproj @@ -85,8 +85,9 @@ True - - ..\packages\NUnit.2.6.3\lib\nunit.framework.dll + + ..\packages\NUnit.3.4.1\lib\net40\nunit.framework.dll + True diff --git a/ClosedXML_Tests/Excel/RichText/XLRichStringTests.cs b/ClosedXML_Tests/Excel/RichText/XLRichStringTests.cs index 062285b..729d680 100644 --- a/ClosedXML_Tests/Excel/RichText/XLRichStringTests.cs +++ b/ClosedXML_Tests/Excel/RichText/XLRichStringTests.cs @@ -597,7 +597,6 @@ } [Test] - [ExpectedException(typeof (IndexOutOfRangeException))] public void Substring_IndexOutsideRange1() { IXLWorksheet ws = new XLWorkbook().Worksheets.Add("Sheet1"); @@ -605,11 +604,10 @@ richString.AddText("Hello"); - IXLFormattedText richText = richString.Substring(50); + Assert.That(() => richString.Substring(50), Throws.TypeOf()); } [Test] - [ExpectedException(typeof (IndexOutOfRangeException))] public void Substring_IndexOutsideRange2() { IXLWorksheet ws = new XLWorkbook().Worksheets.Add("Sheet1"); @@ -618,11 +616,10 @@ richString.AddText("Hello"); richString.AddText("World"); - IXLFormattedText richText = richString.Substring(50); + Assert.That(() => richString.Substring(50), Throws.TypeOf()); } [Test] - [ExpectedException(typeof (IndexOutOfRangeException))] public void Substring_IndexOutsideRange3() { IXLWorksheet ws = new XLWorkbook().Worksheets.Add("Sheet1"); @@ -630,11 +627,10 @@ richString.AddText("Hello"); - IXLFormattedText richText = richString.Substring(1, 10); + Assert.That(() => richString.Substring(1, 10), Throws.TypeOf()); } [Test] - [ExpectedException(typeof (IndexOutOfRangeException))] public void Substring_IndexOutsideRange4() { IXLWorksheet ws = new XLWorkbook().Worksheets.Add("Sheet1"); @@ -643,7 +639,7 @@ richString.AddText("Hello"); richString.AddText("World"); - IXLFormattedText richText = richString.Substring(5, 20); + Assert.That(() => richString.Substring(5, 20), Throws.TypeOf()); } /// diff --git a/ClosedXML_Tests/packages.config b/ClosedXML_Tests/packages.config index d47c16a..dcf0b39 100644 --- a/ClosedXML_Tests/packages.config +++ b/ClosedXML_Tests/packages.config @@ -1,6 +1,5 @@  - - + \ No newline at end of file