From 96855dd727c05a41049919b04078fb793274564a Mon Sep 17 00:00:00 2001 From: dennisvg111 Date: Thu, 30 Nov 2023 17:40:47 +0100 Subject: [PATCH] Replace some checks --- tests/CollectionChecksTests.cs | 8 ++++---- tests/NumberChecksTests.cs | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/CollectionChecksTests.cs b/tests/CollectionChecksTests.cs index 29b1174..aa4c972 100644 --- a/tests/CollectionChecksTests.cs +++ b/tests/CollectionChecksTests.cs @@ -1,5 +1,5 @@ using DG.Common.Exceptions; -using DG.Common.Tests.TestHelpers; +using FluentAssertions; using System; using System.Collections.Generic; using Xunit; @@ -54,7 +54,7 @@ public void IsEmpty_ShouldNotThrow(List values) { Action check = () => ThrowIf.Collection(values, nameof(values)).IsEmpty(); - MoreAsserts.NoExceptions(check); + check.Should().NotThrow(); } [Theory] @@ -77,7 +77,7 @@ public void HasAny_ShouldNotThrow(List values) Action check = () => ThrowIf.Collection(values, nameof(values)).Any(evenCheck); - MoreAsserts.NoExceptions(check); + check.Should().NotThrow(); } [Theory] @@ -100,7 +100,7 @@ public void HasNo_ShouldNotThrow(List values) Action check = () => ThrowIf.Collection(values, nameof(values)).None(evenCheck); - MoreAsserts.NoExceptions(check); + check.Should().NotThrow(); } } } diff --git a/tests/NumberChecksTests.cs b/tests/NumberChecksTests.cs index 01434ed..6344263 100644 --- a/tests/NumberChecksTests.cs +++ b/tests/NumberChecksTests.cs @@ -1,5 +1,5 @@ using DG.Common.Exceptions; -using DG.Common.Tests.TestHelpers; +using FluentAssertions; using System; using Xunit; @@ -41,7 +41,7 @@ public void IntIsZero_ShouldNotThrow(int value) { Action check = () => ThrowIf.Number(value, nameof(value)).IsZero(); - MoreAsserts.NoExceptions(check); + check.Should().NotThrow(); } [Theory] @@ -51,7 +51,7 @@ public void DoubleIsZero_ShouldNotThrow(double value) { Action check = () => ThrowIf.Number(value, nameof(value)).IsZero(); - MoreAsserts.NoExceptions(check); + check.Should().NotThrow(); } [Theory] @@ -70,7 +70,7 @@ public void IntIsNegative_ShouldNotThrow(int value) { Action check = () => ThrowIf.Number(value, nameof(value)).IsNegative(); - MoreAsserts.NoExceptions(check); + check.Should().NotThrow(); } [Theory] @@ -80,7 +80,7 @@ public void ByteIsNegative_ShouldNotThrow(byte value) { Action check = () => ThrowIf.Number(value, nameof(value)).IsNegative(); - MoreAsserts.NoExceptions(check); + check.Should().NotThrow(); } [Theory] @@ -103,7 +103,7 @@ public void IsNotBetweenInclusive_ShouldNotThrow(double value, double min, doubl { Action check = () => ThrowIf.Number(value, nameof(value)).IsNotBetweenInclusive(min, max); - MoreAsserts.NoExceptions(check); + check.Should().NotThrow(); } } }