Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMatthewLayton committed Aug 9, 2024
2 parents edab3b0 + fc0d042 commit b968803
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 106 deletions.
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<Version>9.2.0</Version>
<PackageVersion>9.2.0</PackageVersion>
<AssemblyVersion>9.2.0</AssemblyVersion>
<Version>9.3.0</Version>
<PackageVersion>9.3.0</PackageVersion>
<AssemblyVersion>9.3.0</AssemblyVersion>
</PropertyGroup>
</Project>
40 changes: 32 additions & 8 deletions OnixLabs.Core.UnitTests/PreconditionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -502,22 +502,40 @@ public void RequireWithinRangeInclusiveShouldThrowArgumentOutOfRangeExceptionWhe
[Fact(DisplayName = "RequireWithinRangeInclusive should not throw an ArgumentOutOfRangeException when the value is exactly the minimum value")]
public void RequireWithinRangeInclusiveShouldNotThrowArgumentOutOfRangeExceptionWhenValueIsExactlyTheMinimumValue()
{
// Given / When / Then
RequireWithinRangeInclusive(1, 1, 3);
// Given
const int expected = 1;

// When
int actual = RequireWithinRangeInclusive(expected, 1, 3);

// Then
Assert.Equal(expected, actual);
}

[Fact(DisplayName = "RequireWithinRangeInclusive should not throw an ArgumentOutOfRangeException when the value is exactly the maximum value")]
public void RequireWithinRangeInclusiveShouldNotThrowArgumentOutOfRangeExceptionWhenValueIsExactlyTheMaximumValue()
{
// Given / When / Then
RequireWithinRangeInclusive(3, 1, 3);
// Given
const int expected = 3;

// When
int actual = RequireWithinRangeInclusive(expected, 1, 3);

// Then
Assert.Equal(expected, actual);
}

[Fact(DisplayName = "RequireWithinRangeInclusive should not throw an ArgumentOutOfRangeException when the value is between the specified range")]
public void RequireWithinRangeInclusiveShouldNotThrowArgumentOutOfRangeExceptionWhenValueIsBetweenSpecifiedRange()
{
// Given / When / Then
RequireWithinRangeInclusive(2, 1, 3);
// Given
const int expected = 2;

// When
int actual = RequireWithinRangeInclusive(expected, 1, 3);

// Then
Assert.Equal(expected, actual);
}

[Fact(DisplayName = "RequireWithinRangeExclusive should throw an ArgumentOutOfRangeException when the value falls below the specified range")]
Expand All @@ -543,8 +561,14 @@ public void RequireWithinRangeExclusiveShouldThrowArgumentOutOfRangeExceptionWhe
[Fact(DisplayName = "RequireWithinRangeExclusive should not throw an ArgumentOutOfRangeException when the value falls between the specified range")]
public void RequireWithinRangeExclusiveShouldThrowArgumentOutOfRangeExceptionWhenValueFallsBetweenSpecifiedRange()
{
// Given / When / Then
RequireWithinRangeExclusive(3, 2, 4);
// Given
const int expected = 2;

// When
int actual = RequireWithinRangeExclusive(expected, 1, 3);

// Then
Assert.Equal(expected, actual);
}

[Fact(DisplayName = "RequireNotNull should throw an ArgumentNullException when the condition is null")]
Expand Down
Loading

0 comments on commit b968803

Please sign in to comment.