Skip to content

Commit

Permalink
Replace some checks
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisvg111 committed Nov 30, 2023
1 parent 69e28a9 commit 96855dd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions tests/CollectionChecksTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using DG.Common.Exceptions;
using DG.Common.Tests.TestHelpers;
using FluentAssertions;
using System;
using System.Collections.Generic;
using Xunit;
Expand Down Expand Up @@ -54,7 +54,7 @@ public void IsEmpty_ShouldNotThrow(List<int> values)
{
Action check = () => ThrowIf.Collection(values, nameof(values)).IsEmpty();

MoreAsserts.NoExceptions(check);
check.Should().NotThrow();
}

[Theory]
Expand All @@ -77,7 +77,7 @@ public void HasAny_ShouldNotThrow(List<int> values)

Action check = () => ThrowIf.Collection(values, nameof(values)).Any(evenCheck);

MoreAsserts.NoExceptions(check);
check.Should().NotThrow();
}

[Theory]
Expand All @@ -100,7 +100,7 @@ public void HasNo_ShouldNotThrow(List<int> values)

Action check = () => ThrowIf.Collection(values, nameof(values)).None(evenCheck);

MoreAsserts.NoExceptions(check);
check.Should().NotThrow();
}
}
}
12 changes: 6 additions & 6 deletions tests/NumberChecksTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using DG.Common.Exceptions;
using DG.Common.Tests.TestHelpers;
using FluentAssertions;
using System;
using Xunit;

Expand Down Expand Up @@ -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]
Expand All @@ -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]
Expand All @@ -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]
Expand All @@ -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]
Expand All @@ -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();
}
}
}

0 comments on commit 96855dd

Please sign in to comment.