Skip to content

Commit 8932ab5

Browse files
Bump FsCheck.Xunit from 2.16.5 to 3.1.0 (#66)
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tony Knight <[email protected]>
1 parent 71dc385 commit 8932ab5

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

test/BenchmarkDotNetAnalyser.Tests.Integration/BenchmarkDotNetAnalyser.Tests.Integration.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1313
</PackageReference>
1414
<PackageReference Include="FluentAssertions" Version="7.1.0" />
15-
<PackageReference Include="FsCheck.Xunit" Version="2.16.5" />
15+
<PackageReference Include="FsCheck.Xunit" Version="3.1.0" />
1616
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
1717
<PackageReference Include="NSubstitute" Version="5.3.0" />
1818
<PackageReference Include="System.Net.Http" Version="4.3.4" />

test/BenchmarkDotNetAnalyser.Tests.Unit/Arbitraries.cs

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,31 @@
33
using System.IO;
44
using System.Linq;
55
using FsCheck;
6+
using FsCheck.Fluent;
67

78
namespace BenchmarkDotNetAnalyser.Tests.Unit
89
{
910
public static class AlphanumericStringArbitrary
1011
{
11-
public static Arbitrary<string> GetArbitrary() => Arb.Default.NonEmptyString().Generator
12-
.Where(s => s.Get.All(c => char.IsDigit(c) || char.IsLetter(c)))
13-
.Select(s => s.Get)
12+
public static Arbitrary<string> GetArbitrary() => ArbMap.Default.ArbFor<string>().Generator
13+
.Where(s => !string.IsNullOrEmpty(s))
14+
.Where(s => s.All(c => char.IsDigit(c) || char.IsLetter(c)))
1415
.ToArbitrary();
1516
}
1617

1718
public static class NonIntegerStringArbitrary
1819
{
19-
public static Arbitrary<string> GetArbitrary() => Arb.Default.NonEmptyString().Generator
20-
.Where(s => !int.TryParse(s.Get, out _))
21-
.Select(s => s.Get)
20+
public static Arbitrary<string> GetArbitrary() => ArbMap.Default.ArbFor<string>().Generator
21+
.Where(s => !string.IsNullOrEmpty(s))
22+
.Where(s => !int.TryParse(s, out _))
2223
.ToArbitrary();
2324
}
2425

2526
public static class NonDecimalStringArbitrary
2627
{
27-
public static Arbitrary<string> GetArbitrary() => Arb.Default.NonEmptyString().Generator
28-
.Where(s => !decimal.TryParse(s.Get, out _))
29-
.Select(s => s.Get)
28+
public static Arbitrary<string> GetArbitrary() => ArbMap.Default.ArbFor<string>().Generator
29+
.Where(s => !string.IsNullOrEmpty(s))
30+
.Where(s => !decimal.TryParse(s, out _))
3031
.ToArbitrary();
3132
}
3233

@@ -62,10 +63,10 @@ public static class InvalidPathArbitrary
6263
public static Arbitrary<string> GetArbitrary()
6364
{
6465
var disallowed = new HashSet<string>() { ".", "/", @"\"};
65-
return Arb.Default.NonEmptyString().Generator
66-
.Where(s => !disallowed.Contains(s.Get) &&
67-
!s.Get.All(c => char.IsDigit(c) || char.IsLetter(c)))
68-
.Select(s => s.Get)
66+
return ArbMap.Default.ArbFor<string>().Generator
67+
.Where(s => !string.IsNullOrEmpty(s))
68+
.Where(s => !disallowed.Contains(s) &&
69+
!s.All(c => char.IsDigit(c) || char.IsLetter(c)))
6970
.ToArbitrary();
7071
}
7172
}

test/BenchmarkDotNetAnalyser.Tests.Unit/BenchmarkDotNetAnalyser.Tests.Unit.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1414
</PackageReference>
1515
<PackageReference Include="FluentAssertions" Version="7.1.0" />
16-
<PackageReference Include="FsCheck.Xunit" Version="2.16.5" />
16+
<PackageReference Include="FsCheck.Xunit" Version="3.1.0" />
1717
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
1818
<PackageReference Include="NSubstitute" Version="5.3.0" />
1919
<PackageReference Include="System.Net.Http" Version="4.3.4" />

0 commit comments

Comments
 (0)