Skip to content

Commit 7c37793

Browse files
authored
Merge pull request #812 from polyadic/update-fscheck
Update FsCheck to 3.0
2 parents 180c4bc + 4a9d42f commit 7c37793

File tree

69 files changed

+376
-379
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+376
-379
lines changed

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
2121
<PackageVersion Include="xunit" Version="2.9.3" />
2222
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.1" />
23-
<PackageVersion Include="FsCheck.Xunit" Version="2.16.4" />
23+
<PackageVersion Include="FsCheck.Xunit" Version="3.0.1" />
2424
<PackageVersion Include="coverlet.collector" Version="3.1.2" />
2525
<PackageVersion Include="Verify.XUnit" Version="16.8.1" />
2626
<PackageVersion Include="Verify.SourceGenerators" Version="1.4.0" />
Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
using FsCheck;
2+
using FsCheck.Fluent;
23

34
namespace Funcky.Async.Test;
45

5-
public class AsyncGenerator<T>
6+
internal static class AsyncGenerator
67
{
7-
public static Arbitrary<IAsyncEnumerable<T>> GenerateAsyncEnumerable()
8-
=> Arb.Default.List<T>().Generator.Select(list => list.ToAsyncEnumerable()).ToArbitrary();
8+
public static Arbitrary<IAsyncEnumerable<T>> GenerateAsyncEnumerable<T>(IArbMap map)
9+
=> map.GeneratorFor<List<T>>().Select(list => list.ToAsyncEnumerable()).ToArbitrary();
910

10-
public static Arbitrary<Func<T, ValueTask<T>>> GenerateAwaitSelector()
11-
=> Arb.Default.SystemFunc1<T, T>().Generator.Select(ResultToValueTask).ToArbitrary();
11+
public static Arbitrary<AwaitSelector<T>> GenerateAwaitSelector<T>(IArbMap map)
12+
=> map.GeneratorFor<Func<T, T>>().Select(ResultToValueTask).ToArbitrary();
1213

13-
public static Arbitrary<Func<T, CancellationToken, ValueTask<T>>> GenerateAwaitWithCancellationSelector()
14-
=> Arb.Default.SystemFunc1<T, T>().Generator.Select(ResultToValueTaskX).ToArbitrary();
14+
public static Arbitrary<AwaitSelectorWithCancellation<T>> GenerateAwaitWithCancellationSelector<T>(IArbMap map)
15+
=> map.GeneratorFor<Func<T, T>>().Select(ResultToValueTaskX).ToArbitrary();
1516

16-
private static Func<T, ValueTask<T>> ResultToValueTask(Func<T, T> f)
17-
=> value
18-
=> ValueTask.FromResult(f(value));
17+
private static AwaitSelector<T> ResultToValueTask<T>(Func<T, T> f)
18+
=> new(value => ValueTask.FromResult(f(value)));
1919

20-
private static Func<T, CancellationToken, ValueTask<T>> ResultToValueTaskX(Func<T, T> f)
21-
=> (value, cancellationToken)
22-
=> ValueTask.FromResult(f(value));
20+
private static AwaitSelectorWithCancellation<T> ResultToValueTaskX<T>(Func<T, T> f)
21+
=> new((value, _) => ValueTask.FromResult(f(value)));
2322
}
23+
24+
public sealed record AwaitSelector<T>(Func<T, ValueTask<T>> Get);
25+
26+
public sealed record AwaitSelectorWithCancellation<T>(Func<T, CancellationToken, ValueTask<T>> Get);

Funcky.Async.Test/AsyncSequence/ConcatTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Collections.Immutable;
22
using FsCheck;
3+
using FsCheck.Fluent;
34
using FsCheck.Xunit;
45
using Funcky.Async.Test.TestUtilities;
56

Funcky.Async.Test/AsyncSequence/CycleRangeTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using FsCheck;
2+
using FsCheck.Fluent;
23
using FsCheck.Xunit;
34
using Funcky.Async.Test.TestUtilities;
45
using Funcky.Test.TestUtils;

Funcky.Async.Test/AsyncSequence/CycleTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using FsCheck;
2+
using FsCheck.Fluent;
23
using FsCheck.Xunit;
34
using Funcky.Test.TestUtils;
45

Funcky.Async.Test/AsyncSequence/RepeatRangeTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using FsCheck;
2+
using FsCheck.Fluent;
23
using FsCheck.Xunit;
34
using Funcky.Async.Test.TestUtilities;
45
using Funcky.Test.TestUtils;

Funcky.Async.Test/AsyncSequence/ReturnTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using FsCheck;
2+
using FsCheck.Fluent;
23
using FsCheck.Xunit;
34
using Funcky.Async.Test.TestUtilities;
45

Funcky.Async.Test/Extensions/AsyncEnumerableExtensions/AverageOrNoneTest.cs

Lines changed: 56 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,150 +1,136 @@
11
// ReSharper disable PossibleMultipleEnumeration
22
using FsCheck;
3-
using FsCheck.Xunit;
3+
using FsCheck.Fluent;
44
using Funcky.Test.Internal;
55

66
namespace Funcky.Async.Test.Extensions.AsyncEnumerableExtensions;
77

88
public sealed class AverageOrNoneTest
99
{
10-
public AverageOrNoneTest()
11-
{
12-
Arb.Register<AsyncGenerator<int?>>();
13-
Arb.Register<AsyncGenerator<int>>();
14-
Arb.Register<AsyncGenerator<long?>>();
15-
Arb.Register<AsyncGenerator<long>>();
16-
Arb.Register<AsyncGenerator<float?>>();
17-
Arb.Register<AsyncGenerator<float>>();
18-
Arb.Register<AsyncGenerator<double?>>();
19-
Arb.Register<AsyncGenerator<double>>();
20-
Arb.Register<AsyncGenerator<decimal?>>();
21-
Arb.Register<AsyncGenerator<decimal>>();
22-
}
23-
2410
// Int32/int Tests
25-
[Property]
11+
[FunckyAsyncProperty]
2612
public Property AverageOrNoneAsyncGivesTheSameResultAsAverageAsyncForInt32(IAsyncEnumerable<int> sequence)
2713
=> CompareAverageAndHandleEmptyInt32SequenceAsync(sequence).Result.ToProperty();
2814

29-
[Property]
15+
[FunckyAsyncProperty]
3016
public Property AverageOrNoneAsyncGivesTheSameResultAsAverageForNullableAsyncForInt32(IAsyncEnumerable<int?> sequence)
3117
=> (Option.FromNullable(sequence.AverageAsync().Result)
3218
== sequence.Select(Option.FromNullable).AverageOrNoneAsync().Result).ToProperty();
3319

34-
[Property]
20+
[FunckyAsyncProperty]
3521
public Property AverageOrNoneAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForInt32(IAsyncEnumerable<int?> sequence, Func<int?, int?> selector)
3622
=> (Option.FromNullable(sequence.AverageAsync(selector).Result)
3723
== sequence.Select(Option.FromNullable).AverageOrNoneAsync(SelectorTransformation.TransformNullableSelector(selector)).Result).ToProperty();
3824

39-
[Property]
40-
public Property AverageOrNoneAwaitAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForInt32(IAsyncEnumerable<int?> sequence, Func<int?, ValueTask<int?>> selector)
41-
=> (Option.FromNullable(sequence.AverageAwaitAsync(selector).Result)
42-
== sequence.Select(Option.FromNullable).AverageOrNoneAwaitAsync(SelectorTransformation.TransformNullableSelector(selector)).Result).ToProperty();
25+
[FunckyAsyncProperty]
26+
public Property AverageOrNoneAwaitAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForInt32(IAsyncEnumerable<int?> sequence, AwaitSelector<int?> selector)
27+
=> (Option.FromNullable(sequence.AverageAwaitAsync(selector.Get).Result)
28+
== sequence.Select(Option.FromNullable).AverageOrNoneAwaitAsync(SelectorTransformation.TransformNullableSelector(selector.Get)).Result).ToProperty();
4329

44-
[Property]
45-
public Property AverageAwaitWithCancellationAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForInt32(IAsyncEnumerable<int?> sequence, Func<int?, CancellationToken, ValueTask<int?>> selector)
46-
=> (Option.FromNullable(sequence.AverageAwaitWithCancellationAsync(selector).Result)
47-
== sequence.Select(Option.FromNullable).AverageOrNoneAwaitWithCancellationAsync(SelectorTransformation.TransformNullableSelector(selector)).Result).ToProperty();
30+
[FunckyAsyncProperty]
31+
public Property AverageAwaitWithCancellationAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForInt32(IAsyncEnumerable<int?> sequence, AwaitSelectorWithCancellation<int?> selector)
32+
=> (Option.FromNullable(sequence.AverageAwaitWithCancellationAsync(selector.Get).Result)
33+
== sequence.Select(Option.FromNullable).AverageOrNoneAwaitWithCancellationAsync(SelectorTransformation.TransformNullableSelector(selector.Get)).Result).ToProperty();
4834

4935
// Int64/long Tests
50-
[Property]
36+
[FunckyAsyncProperty]
5137
public Property AverageOrNoneAsyncGivesTheSameResultAsAverageAsyncForInt64(IAsyncEnumerable<long> sequence)
5238
=> CompareAverageAndHandleEmptyInt64SequenceAsync(sequence).Result.ToProperty();
5339

54-
[Property]
40+
[FunckyAsyncProperty]
5541
public Property AverageOrNoneAsyncGivesTheSameResultAsAverageForNullableAsyncForInt64(IAsyncEnumerable<long?> sequence)
5642
=> (Option.FromNullable(sequence.AverageAsync().Result)
5743
== sequence.Select(Option.FromNullable).AverageOrNoneAsync().Result).ToProperty();
5844

59-
[Property]
45+
[FunckyAsyncProperty]
6046
public Property AverageOrNoneAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForInt64(IAsyncEnumerable<long?> sequence, Func<long?, long?> selector)
6147
=> (Option.FromNullable(sequence.AverageAsync(selector).Result)
6248
== sequence.Select(Option.FromNullable).AverageOrNoneAsync(SelectorTransformation.TransformNullableSelector(selector)).Result).ToProperty();
6349

64-
[Property]
65-
public Property AverageOrNoneAwaitAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForInt64(IAsyncEnumerable<long?> sequence, Func<long?, ValueTask<long?>> selector)
66-
=> (Option.FromNullable(sequence.AverageAwaitAsync(selector).Result)
67-
== sequence.Select(Option.FromNullable).AverageOrNoneAwaitAsync(SelectorTransformation.TransformNullableSelector(selector)).Result).ToProperty();
50+
[FunckyAsyncProperty]
51+
public Property AverageOrNoneAwaitAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForInt64(IAsyncEnumerable<long?> sequence, AwaitSelector<long?> selector)
52+
=> (Option.FromNullable(sequence.AverageAwaitAsync(selector.Get).Result)
53+
== sequence.Select(Option.FromNullable).AverageOrNoneAwaitAsync(SelectorTransformation.TransformNullableSelector(selector.Get)).Result).ToProperty();
6854

69-
[Property]
70-
public Property AverageAwaitWithCancellationAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForInt64(IAsyncEnumerable<int?> sequence, Func<int?, CancellationToken, ValueTask<int?>> selector)
71-
=> (Option.FromNullable(sequence.AverageAwaitWithCancellationAsync(selector).Result)
72-
== sequence.Select(Option.FromNullable).AverageOrNoneAwaitWithCancellationAsync(SelectorTransformation.TransformNullableSelector(selector)).Result).ToProperty();
55+
[FunckyAsyncProperty]
56+
public Property AverageAwaitWithCancellationAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForInt64(IAsyncEnumerable<int?> sequence, AwaitSelectorWithCancellation<int?> selector)
57+
=> (Option.FromNullable(sequence.AverageAwaitWithCancellationAsync(selector.Get).Result)
58+
== sequence.Select(Option.FromNullable).AverageOrNoneAwaitWithCancellationAsync(SelectorTransformation.TransformNullableSelector(selector.Get)).Result).ToProperty();
7359

7460
// Single/float Tests
75-
[Property]
61+
[FunckyAsyncProperty]
7662
public Property AverageOrNoneAsyncGivesTheSameResultAsAverageAsyncForSingle(IAsyncEnumerable<float> sequence)
7763
=> CompareAverageAndHandleEmptySingleSequenceAsync(sequence).Result.ToProperty();
7864

79-
[Property]
65+
[FunckyAsyncProperty]
8066
public Property AverageOrNoneAsyncGivesTheSameResultAsAverageForNullableAsyncForSingle(IAsyncEnumerable<float?> sequence)
8167
=> (Option.FromNullable(sequence.AverageAsync().Result)
8268
== sequence.Select(Option.FromNullable).AverageOrNoneAsync().Result).ToProperty();
8369

84-
[Property]
70+
[FunckyAsyncProperty]
8571
public Property AverageOrNoneAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForSingle(IAsyncEnumerable<float?> sequence, Func<float?, float?> selector)
8672
=> (Option.FromNullable(sequence.AverageAsync(selector).Result)
8773
== sequence.Select(Option.FromNullable).AverageOrNoneAsync(SelectorTransformation.TransformNullableSelector(selector)).Result).ToProperty();
8874

89-
[Property]
90-
public Property AverageOrNoneAwaitAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForSingle(IAsyncEnumerable<float?> sequence, Func<float?, ValueTask<float?>> selector)
91-
=> (Option.FromNullable(sequence.AverageAwaitAsync(selector).Result)
92-
== sequence.Select(Option.FromNullable).AverageOrNoneAwaitAsync(SelectorTransformation.TransformNullableSelector(selector)).Result).ToProperty();
75+
[FunckyAsyncProperty]
76+
public Property AverageOrNoneAwaitAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForSingle(IAsyncEnumerable<float?> sequence, AwaitSelector<float?> selector)
77+
=> (Option.FromNullable(sequence.AverageAwaitAsync(selector.Get).Result)
78+
== sequence.Select(Option.FromNullable).AverageOrNoneAwaitAsync(SelectorTransformation.TransformNullableSelector(selector.Get)).Result).ToProperty();
9379

94-
[Property]
95-
public Property AverageAwaitWithCancellationAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForSingle(IAsyncEnumerable<float?> sequence, Func<float?, CancellationToken, ValueTask<float?>> selector)
96-
=> (Option.FromNullable(sequence.AverageAwaitWithCancellationAsync(selector).Result)
97-
== sequence.Select(Option.FromNullable).AverageOrNoneAwaitWithCancellationAsync(SelectorTransformation.TransformNullableSelector(selector)).Result).ToProperty();
80+
[FunckyAsyncProperty]
81+
public Property AverageAwaitWithCancellationAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForSingle(IAsyncEnumerable<float?> sequence, AwaitSelectorWithCancellation<float?> selector)
82+
=> (Option.FromNullable(sequence.AverageAwaitWithCancellationAsync(selector.Get).Result)
83+
== sequence.Select(Option.FromNullable).AverageOrNoneAwaitWithCancellationAsync(SelectorTransformation.TransformNullableSelector(selector.Get)).Result).ToProperty();
9884

9985
// Double/double Tests
100-
[Property]
86+
[FunckyAsyncProperty]
10187
public Property AverageOrNoneAsyncGivesTheSameResultAsAverageAsyncForDouble(IAsyncEnumerable<double> sequence)
10288
=> CompareAverageAndHandleEmptyDoubleSequenceAsync(sequence).Result.ToProperty();
10389

104-
[Property]
90+
[FunckyAsyncProperty]
10591
public Property AverageOrNoneAsyncGivesTheSameResultAsAverageForNullableAsyncForDouble(IAsyncEnumerable<double?> sequence)
10692
=> (Option.FromNullable(sequence.AverageAsync().Result)
10793
== sequence.Select(Option.FromNullable).AverageOrNoneAsync().Result).ToProperty();
10894

109-
[Property]
95+
[FunckyAsyncProperty]
11096
public Property AverageOrNoneAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForDouble(IAsyncEnumerable<double?> sequence, Func<double?, double?> selector)
11197
=> (Option.FromNullable(sequence.AverageAsync(selector).Result)
11298
== sequence.Select(Option.FromNullable).AverageOrNoneAsync(SelectorTransformation.TransformNullableSelector(selector)).Result).ToProperty();
11399

114-
[Property]
115-
public Property AverageOrNoneAwaitAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForDouble(IAsyncEnumerable<double?> sequence, Func<double?, ValueTask<double?>> selector)
116-
=> (Option.FromNullable(sequence.AverageAwaitAsync(selector).Result)
117-
== sequence.Select(Option.FromNullable).AverageOrNoneAwaitAsync(SelectorTransformation.TransformNullableSelector(selector)).Result).ToProperty();
100+
[FunckyAsyncProperty]
101+
public Property AverageOrNoneAwaitAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForDouble(IAsyncEnumerable<double?> sequence, AwaitSelector<double?> selector)
102+
=> (Option.FromNullable(sequence.AverageAwaitAsync(selector.Get).Result)
103+
== sequence.Select(Option.FromNullable).AverageOrNoneAwaitAsync(SelectorTransformation.TransformNullableSelector(selector.Get)).Result).ToProperty();
118104

119-
[Property]
120-
public Property AverageAwaitWithCancellationAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForDouble(IAsyncEnumerable<double?> sequence, Func<double?, CancellationToken, ValueTask<double?>> selector)
121-
=> (Option.FromNullable(sequence.AverageAwaitWithCancellationAsync(selector).Result)
122-
== sequence.Select(Option.FromNullable).AverageOrNoneAwaitWithCancellationAsync(SelectorTransformation.TransformNullableSelector(selector)).Result).ToProperty();
105+
[FunckyAsyncProperty]
106+
public Property AverageAwaitWithCancellationAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForDouble(IAsyncEnumerable<double?> sequence, AwaitSelectorWithCancellation<double?> selector)
107+
=> (Option.FromNullable(sequence.AverageAwaitWithCancellationAsync(selector.Get).Result)
108+
== sequence.Select(Option.FromNullable).AverageOrNoneAwaitWithCancellationAsync(SelectorTransformation.TransformNullableSelector(selector.Get)).Result).ToProperty();
123109

124110
// Decimal/decimal Tests
125-
[Property]
111+
[FunckyAsyncProperty]
126112
public Property AverageOrNoneAsyncGivesTheSameResultAsAverageAsyncForDecimal(IAsyncEnumerable<decimal> sequence)
127113
=> CompareAverageAndHandleEmptyDecimalSequenceAsync(sequence).Result.ToProperty();
128114

129-
[Property]
115+
[FunckyAsyncProperty]
130116
public Property AverageOrNoneAsyncGivesTheSameResultAsAverageForNullableAsyncForDecimal(IAsyncEnumerable<decimal?> sequence)
131117
=> (Option.FromNullable(sequence.AverageAsync().Result)
132118
== sequence.Select(Option.FromNullable).AverageOrNoneAsync().Result).ToProperty();
133119

134-
[Property]
120+
[FunckyAsyncProperty]
135121
public Property AverageOrNoneAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForDecimal(IAsyncEnumerable<decimal?> sequence, Func<decimal?, decimal?> selector)
136122
=> (Option.FromNullable(sequence.AverageAsync(selector).Result)
137123
== sequence.Select(Option.FromNullable).AverageOrNoneAsync(SelectorTransformation.TransformNullableSelector(selector)).Result).ToProperty();
138124

139-
[Property]
140-
public Property AverageOrNoneAwaitAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForDecimal(IAsyncEnumerable<decimal?> sequence, Func<decimal?, ValueTask<decimal?>> selector)
141-
=> (Option.FromNullable(sequence.AverageAwaitAsync(selector).Result)
142-
== sequence.Select(Option.FromNullable).AverageOrNoneAwaitAsync(SelectorTransformation.TransformNullableSelector(selector)).Result).ToProperty();
125+
[FunckyAsyncProperty]
126+
public Property AverageOrNoneAwaitAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForDecimal(IAsyncEnumerable<decimal?> sequence, AwaitSelector<decimal?> selector)
127+
=> (Option.FromNullable(sequence.AverageAwaitAsync(selector.Get).Result)
128+
== sequence.Select(Option.FromNullable).AverageOrNoneAwaitAsync(SelectorTransformation.TransformNullableSelector(selector.Get)).Result).ToProperty();
143129

144-
[Property]
145-
public Property AverageAwaitWithCancellationAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForDecimal(IAsyncEnumerable<decimal?> sequence, Func<decimal?, CancellationToken, ValueTask<decimal?>> selector)
146-
=> (Option.FromNullable(sequence.AverageAwaitWithCancellationAsync(selector).Result)
147-
== sequence.Select(Option.FromNullable).AverageOrNoneAwaitWithCancellationAsync(SelectorTransformation.TransformNullableSelector(selector)).Result).ToProperty();
130+
[FunckyAsyncProperty]
131+
public Property AverageAwaitWithCancellationAsyncWithSelectorGivesTheSameResultAsAverageForNullableAsyncForDecimal(IAsyncEnumerable<decimal?> sequence, AwaitSelectorWithCancellation<decimal?> selector)
132+
=> (Option.FromNullable(sequence.AverageAwaitWithCancellationAsync(selector.Get).Result)
133+
== sequence.Select(Option.FromNullable).AverageOrNoneAwaitWithCancellationAsync(SelectorTransformation.TransformNullableSelector(selector.Get)).Result).ToProperty();
148134

149135
private static async Task<bool> CompareAverageAndHandleEmptyInt32SequenceAsync(IAsyncEnumerable<int> sequence)
150136
=> await sequence.AnyAsync()

Funcky.Async.Test/Extensions/AsyncEnumerableExtensions/ElementAtOrNoneTest.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using FsCheck;
2-
using FsCheck.Xunit;
2+
using FsCheck.Fluent;
33
using Funcky.FsCheck;
44
using static Funcky.Async.Test.Extensions.AsyncEnumerableExtensions.TestData;
55

@@ -33,9 +33,7 @@ public async Task ElementAtOrNoneReturnsSomeWithinTheRangeAndNoneOutside()
3333

3434
public sealed class IndexIndex
3535
{
36-
public IndexIndex() => FunckyGenerators.Register();
37-
38-
[Property(Verbose = true)]
36+
[FunckyProperty(Verbose = true)]
3937
public Property BehavesIdenticalToSynchronousCounterpart(List<int> source, Index index)
4038
=> (source.ElementAtOrNone(index) == source.ToAsyncEnumerable().ElementAtOrNoneAsync(index).Result)
4139
.ToProperty();

0 commit comments

Comments
 (0)