Skip to content

Commit e85904d

Browse files
committed
Multi-target test helpers
1 parent 4b7496c commit e85904d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

test/TestHelpers/RandomExtensions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ namespace Microsoft.DurableTask;
55

66
public static class RandomExtensions
77
{
8+
#if NET6_0_OR_GREATER
89
public static DateTimeOffset NextDateTimeOffset(this Random random, DateTimeOffset min, TimeSpan max)
910
{
1011
ArgumentNullException.ThrowIfNull(random);
@@ -26,4 +27,5 @@ public static DateTime NextDateTime(this Random random, DateTime min, TimeSpan m
2627

2728
public static DateTime NextDateTime(this Random random, TimeSpan max)
2829
=> random.NextDateTime(DateTime.UtcNow, max);
30+
#endif
2931
}

test/TestHelpers/TestHelpers.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6</TargetFramework>
4+
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup>

0 commit comments

Comments
 (0)