Skip to content

Commit

Permalink
Fix tests in net7
Browse files Browse the repository at this point in the history
  • Loading branch information
ardalis committed Sep 11, 2024
1 parent 67d9f10 commit 8de48b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

#if NET8_0_OR_GREATER
#if NET7_0_OR_GREATER
namespace Ardalis.Result.AspNetCore;

public static partial class ResultExtensions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NET8_0_OR_GREATER
#if NET7_0_OR_GREATER

using Ardalis.Result.AspNetCore;
using Xunit;
Expand All @@ -22,6 +22,13 @@ public void ToMinimalApiResultHandlesAllResultStatusValues()
{
foreach (ResultStatus resultStatus in Enum.GetValues(typeof(ResultStatus)))
{
#if NET7_0
// Results.Created does not accept empty string URI in net7
if (resultStatus == ResultStatus.Created)
{
continue;
}
#endif
Result result = new TestResult(resultStatus);
try
{
Expand Down

0 comments on commit 8de48b9

Please sign in to comment.