From ac65f47c095f14d8b26643cbf1634608ee10ee46 Mon Sep 17 00:00:00 2001 From: Lukas Gasselsberger Date: Fri, 30 Dec 2022 10:20:56 +0100 Subject: [PATCH] Rename `Times` to `TimesExactly` to avoid ambiguity --- .../Extensions/OccurrenceConstraintExtensions.cs | 2 +- .../ApprovedApi/FluentAssertions/net47.verified.txt | 2 +- .../ApprovedApi/FluentAssertions/net6.0.verified.txt | 2 +- .../ApprovedApi/FluentAssertions/netcoreapp2.1.verified.txt | 2 +- .../ApprovedApi/FluentAssertions/netcoreapp3.0.verified.txt | 2 +- .../ApprovedApi/FluentAssertions/netstandard2.0.verified.txt | 2 +- .../ApprovedApi/FluentAssertions/netstandard2.1.verified.txt | 2 +- Tests/FluentAssertions.Specs/OccurrenceConstraintSpecs.cs | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Src/FluentAssertions/Extensions/OccurrenceConstraintExtensions.cs b/Src/FluentAssertions/Extensions/OccurrenceConstraintExtensions.cs index 9d6b6890aa..418e9c75fd 100644 --- a/Src/FluentAssertions/Extensions/OccurrenceConstraintExtensions.cs +++ b/Src/FluentAssertions/Extensions/OccurrenceConstraintExtensions.cs @@ -2,7 +2,7 @@ namespace FluentAssertions.Extensions; public static class OccurrenceConstraintExtensions { - public static OccurrenceConstraint Times(this int times) + public static OccurrenceConstraint TimesExactly(this int times) { return Exactly.Times(times); } diff --git a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net47.verified.txt b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net47.verified.txt index 80c47b5548..0d33701140 100644 --- a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net47.verified.txt +++ b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net47.verified.txt @@ -1478,7 +1478,7 @@ namespace FluentAssertions.Extensions } public static class OccurrenceConstraintExtensions { - public static FluentAssertions.OccurrenceConstraint Times(this int times) { } + public static FluentAssertions.OccurrenceConstraint TimesExactly(this int times) { } public static FluentAssertions.OccurrenceConstraint TimesOrLess(this int times) { } public static FluentAssertions.OccurrenceConstraint TimesOrMore(this int times) { } } diff --git a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net6.0.verified.txt b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net6.0.verified.txt index 21bfcdceec..e30d2876a4 100644 --- a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net6.0.verified.txt +++ b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net6.0.verified.txt @@ -1491,7 +1491,7 @@ namespace FluentAssertions.Extensions } public static class OccurrenceConstraintExtensions { - public static FluentAssertions.OccurrenceConstraint Times(this int times) { } + public static FluentAssertions.OccurrenceConstraint TimesExactly(this int times) { } public static FluentAssertions.OccurrenceConstraint TimesOrLess(this int times) { } public static FluentAssertions.OccurrenceConstraint TimesOrMore(this int times) { } } diff --git a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netcoreapp2.1.verified.txt b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netcoreapp2.1.verified.txt index e0e6615895..3fe8827c14 100644 --- a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netcoreapp2.1.verified.txt +++ b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netcoreapp2.1.verified.txt @@ -1478,7 +1478,7 @@ namespace FluentAssertions.Extensions } public static class OccurrenceConstraintExtensions { - public static FluentAssertions.OccurrenceConstraint Times(this int times) { } + public static FluentAssertions.OccurrenceConstraint TimesExactly(this int times) { } public static FluentAssertions.OccurrenceConstraint TimesOrLess(this int times) { } public static FluentAssertions.OccurrenceConstraint TimesOrMore(this int times) { } } diff --git a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netcoreapp3.0.verified.txt b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netcoreapp3.0.verified.txt index e0e6615895..3fe8827c14 100644 --- a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netcoreapp3.0.verified.txt +++ b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netcoreapp3.0.verified.txt @@ -1478,7 +1478,7 @@ namespace FluentAssertions.Extensions } public static class OccurrenceConstraintExtensions { - public static FluentAssertions.OccurrenceConstraint Times(this int times) { } + public static FluentAssertions.OccurrenceConstraint TimesExactly(this int times) { } public static FluentAssertions.OccurrenceConstraint TimesOrLess(this int times) { } public static FluentAssertions.OccurrenceConstraint TimesOrMore(this int times) { } } diff --git a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.0.verified.txt b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.0.verified.txt index cc41f8552d..6269525f6b 100644 --- a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.0.verified.txt +++ b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.0.verified.txt @@ -1429,7 +1429,7 @@ namespace FluentAssertions.Extensions } public static class OccurrenceConstraintExtensions { - public static FluentAssertions.OccurrenceConstraint Times(this int times) { } + public static FluentAssertions.OccurrenceConstraint TimesExactly(this int times) { } public static FluentAssertions.OccurrenceConstraint TimesOrLess(this int times) { } public static FluentAssertions.OccurrenceConstraint TimesOrMore(this int times) { } } diff --git a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.1.verified.txt b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.1.verified.txt index e0e6615895..3fe8827c14 100644 --- a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.1.verified.txt +++ b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.1.verified.txt @@ -1478,7 +1478,7 @@ namespace FluentAssertions.Extensions } public static class OccurrenceConstraintExtensions { - public static FluentAssertions.OccurrenceConstraint Times(this int times) { } + public static FluentAssertions.OccurrenceConstraint TimesExactly(this int times) { } public static FluentAssertions.OccurrenceConstraint TimesOrLess(this int times) { } public static FluentAssertions.OccurrenceConstraint TimesOrMore(this int times) { } } diff --git a/Tests/FluentAssertions.Specs/OccurrenceConstraintSpecs.cs b/Tests/FluentAssertions.Specs/OccurrenceConstraintSpecs.cs index be99952a2d..d8b8e800c9 100644 --- a/Tests/FluentAssertions.Specs/OccurrenceConstraintSpecs.cs +++ b/Tests/FluentAssertions.Specs/OccurrenceConstraintSpecs.cs @@ -34,7 +34,7 @@ public class OccurrenceConstraintSpecs { Exactly.Twice(), 2 }, { Exactly.Thrice(), 3 }, { Exactly.Times(4), 4 }, - { 4.Times(), 4 }, + { 4.TimesExactly(), 4 }, { LessThan.Twice(), 1 }, { LessThan.Thrice(), 2 }, { LessThan.Times(4), 3 }, @@ -78,7 +78,7 @@ public void Occurrence_constraint_passes(OccurrenceConstraint constraint, int oc { Exactly.Thrice(), 4 }, { Exactly.Times(4), 3 }, { Exactly.Times(4), 5 }, - { 4.Times(), 1 }, + { 4.TimesExactly(), 1 }, { LessThan.Twice(), 2 }, { LessThan.Twice(), 3 }, { LessThan.Thrice(), 3 },