Skip to content

Commit d8c1b19

Browse files
committed
cleanup
1 parent 96ebd1f commit d8c1b19

36 files changed

+112
-142
lines changed

src/FluentAssertions.BestPractices/Tips/Collections/CollectionShouldBeEmpty.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ public class CollectionShouldBeEmptyAnalyzer : FluentAssertionsAnalyzer
1818
public const string Message = "Use {0} .Should() followed by .BeEmpty() instead.";
1919

2020
protected override DiagnosticDescriptor Rule => new DiagnosticDescriptor(DiagnosticId, Title, Message, Category, DiagnosticSeverity.Info, true);
21-
protected override IEnumerable<(FluentAssertionsCSharpSyntaxVisitor, BecauseArgumentsSyntaxVisitor)> Visitors
21+
protected override IEnumerable<FluentAssertionsCSharpSyntaxVisitor> Visitors
2222
{
2323
get
2424
{
25-
yield return (new AnyShouldBeFalseSyntaxVisitor(), new BecauseArgumentsSyntaxVisitor("BeFalse", 0));
26-
yield return (new ShouldHaveCount0SyntaxVisitor(), new BecauseArgumentsSyntaxVisitor("HaveCount", 1));
25+
yield return new AnyShouldBeFalseSyntaxVisitor();
26+
yield return new ShouldHaveCount0SyntaxVisitor();
2727
}
2828
}
2929

src/FluentAssertions.BestPractices/Tips/Collections/CollectionShouldBeInAscendingOrder.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using Microsoft.CodeAnalysis;
22
using Microsoft.CodeAnalysis.CodeFixes;
3-
using Microsoft.CodeAnalysis.CSharp;
43
using Microsoft.CodeAnalysis.CSharp.Syntax;
54
using Microsoft.CodeAnalysis.Diagnostics;
65
using System.Collections.Generic;
@@ -18,11 +17,11 @@ public class CollectionShouldBeInAscendingOrderAnalyzer : FluentAssertionsAnalyz
1817
public const string Message = "Use {0} .Should() followed by .BeInAscendingOrder() instead.";
1918

2019
protected override DiagnosticDescriptor Rule => new DiagnosticDescriptor(DiagnosticId, Title, Message, Category, DiagnosticSeverity.Info, true);
21-
protected override IEnumerable<(FluentAssertionsCSharpSyntaxVisitor, BecauseArgumentsSyntaxVisitor)> Visitors
20+
protected override IEnumerable<FluentAssertionsCSharpSyntaxVisitor> Visitors
2221
{
2322
get
2423
{
25-
yield return (new OrderByShouldEqualSyntaxVisitor(), new BecauseArgumentsSyntaxVisitor("Equal", 1));
24+
yield return new OrderByShouldEqualSyntaxVisitor();
2625
}
2726
}
2827
private class OrderByShouldEqualSyntaxVisitor : FluentAssertionsWithLambdaArgumentCSharpSyntaxVisitor

src/FluentAssertions.BestPractices/Tips/Collections/CollectionShouldBeInDescendingOrder.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using Microsoft.CodeAnalysis;
22
using Microsoft.CodeAnalysis.CodeFixes;
3-
using Microsoft.CodeAnalysis.CSharp;
43
using Microsoft.CodeAnalysis.CSharp.Syntax;
54
using Microsoft.CodeAnalysis.Diagnostics;
65
using System.Collections.Generic;
@@ -18,11 +17,11 @@ public class CollectionShouldBeInDescendingOrderAnalyzer : FluentAssertionsAnaly
1817
public const string Message = "Use {0} .Should() followed by .BeInDescendingOrder instead.";
1918

2019
protected override DiagnosticDescriptor Rule => new DiagnosticDescriptor(DiagnosticId, Title, Message, Category, DiagnosticSeverity.Info, true);
21-
protected override IEnumerable<(FluentAssertionsCSharpSyntaxVisitor, BecauseArgumentsSyntaxVisitor)> Visitors
20+
protected override IEnumerable<FluentAssertionsCSharpSyntaxVisitor> Visitors
2221
{
2322
get
2423
{
25-
yield return (new OrderByDescendingShouldEqualSyntaxVisitor(), new BecauseArgumentsSyntaxVisitor("Equal", 1));
24+
yield return new OrderByDescendingShouldEqualSyntaxVisitor();
2625
}
2726
}
2827
private class OrderByDescendingShouldEqualSyntaxVisitor : FluentAssertionsWithLambdaArgumentCSharpSyntaxVisitor

src/FluentAssertions.BestPractices/Tips/Collections/CollectionShouldContainItem.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using Microsoft.CodeAnalysis;
22
using Microsoft.CodeAnalysis.CodeFixes;
3-
using Microsoft.CodeAnalysis.CSharp;
43
using Microsoft.CodeAnalysis.CSharp.Syntax;
54
using Microsoft.CodeAnalysis.Diagnostics;
65
using System.Collections.Generic;
@@ -19,11 +18,11 @@ public class CollectionShouldContainItemAnalyzer : FluentAssertionsAnalyzer
1918

2019
protected override DiagnosticDescriptor Rule => new DiagnosticDescriptor(DiagnosticId, Title, Message, Category, DiagnosticSeverity.Info, true);
2120

22-
protected override IEnumerable<(FluentAssertionsCSharpSyntaxVisitor, BecauseArgumentsSyntaxVisitor)> Visitors
21+
protected override IEnumerable<FluentAssertionsCSharpSyntaxVisitor> Visitors
2322
{
2423
get
2524
{
26-
yield return (new ContainsShouldBeTrueSyntaxVisitor(), new BecauseArgumentsSyntaxVisitor("BeTrue", 0));
25+
yield return new ContainsShouldBeTrueSyntaxVisitor();
2726
}
2827
}
2928

src/FluentAssertions.BestPractices/Tips/Collections/CollectionShouldContainProperty.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ public class CollectionShouldContainPropertyAnalyzer : FluentAssertionsAnalyzer
1717
public const string Message = "Use {0} .Should() followed by .Contain() instead.";
1818

1919
protected override DiagnosticDescriptor Rule => new DiagnosticDescriptor(DiagnosticId, Title, Message, Category, DiagnosticSeverity.Info, true);
20-
protected override IEnumerable<(FluentAssertionsCSharpSyntaxVisitor, BecauseArgumentsSyntaxVisitor)> Visitors
20+
protected override IEnumerable<FluentAssertionsCSharpSyntaxVisitor> Visitors
2121
{
2222
get
2323
{
24-
yield return (new AnyShouldBeTrueSyntaxVisitor(), new BecauseArgumentsSyntaxVisitor("BeTrue", 0));
25-
yield return (new WhereShouldNotBeEmptySyntaxVisitor(), new BecauseArgumentsSyntaxVisitor("NotBeEmpty", 0));
24+
yield return new AnyShouldBeTrueSyntaxVisitor();
25+
yield return new WhereShouldNotBeEmptySyntaxVisitor();
2626
}
2727
}
2828

src/FluentAssertions.BestPractices/Tips/Collections/CollectionShouldContainSingle.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ public class CollectionShouldContainSingleAnalyzer : FluentAssertionsAnalyzer
1717
public const string Message = "Use {0} .Should() followed by .ContainSingle() instead.";
1818

1919
protected override DiagnosticDescriptor Rule => new DiagnosticDescriptor(DiagnosticId, Title, Message, Category, DiagnosticSeverity.Info, true);
20-
protected override IEnumerable<(FluentAssertionsCSharpSyntaxVisitor, BecauseArgumentsSyntaxVisitor)> Visitors
20+
protected override IEnumerable<FluentAssertionsCSharpSyntaxVisitor> Visitors
2121
{
2222
get
2323
{
24-
yield return (new WhereShouldHaveCount1SyntaxVisitor(), new BecauseArgumentsSyntaxVisitor("HaveCount", 1));
25-
yield return (new ShouldHaveCount1SyntaxVisitor(), new BecauseArgumentsSyntaxVisitor("HaveCount", 1));
24+
yield return new WhereShouldHaveCount1SyntaxVisitor();
25+
yield return new ShouldHaveCount1SyntaxVisitor();
2626
}
2727
}
2828

src/FluentAssertions.BestPractices/Tips/Collections/CollectionShouldEqualOtherCollectionByComparer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ public class CollectionShouldEqualOtherCollectionByComparerAnalyzer : FluentAsse
1919

2020
protected override DiagnosticDescriptor Rule => new DiagnosticDescriptor(DiagnosticId, Title, Message, Category, DiagnosticSeverity.Info, true);
2121

22-
protected override IEnumerable<(FluentAssertionsCSharpSyntaxVisitor, BecauseArgumentsSyntaxVisitor)> Visitors
22+
protected override IEnumerable<FluentAssertionsCSharpSyntaxVisitor> Visitors
2323
{
2424
get
2525
{
26-
yield return (new SelectShouldEqualOtherCollectionSelectSyntaxVisitor(), new BecauseArgumentsSyntaxVisitor("Equal", 1));
26+
yield return new SelectShouldEqualOtherCollectionSelectSyntaxVisitor();
2727
}
2828
}
2929

src/FluentAssertions.BestPractices/Tips/Collections/CollectionShouldHaveCount.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using Microsoft.CodeAnalysis;
22
using Microsoft.CodeAnalysis.CodeFixes;
3-
using Microsoft.CodeAnalysis.CSharp;
43
using Microsoft.CodeAnalysis.CSharp.Syntax;
54
using Microsoft.CodeAnalysis.Diagnostics;
65
using System.Collections.Generic;
@@ -18,11 +17,11 @@ public class CollectionShouldHaveCountAnalyzer : FluentAssertionsAnalyzer
1817
public const string Message = "Use {0} .Should() followed by .HaveCount() instead.";
1918

2019
protected override DiagnosticDescriptor Rule => new DiagnosticDescriptor(DiagnosticId, Title, Message, Category, DiagnosticSeverity.Info, true);
21-
protected override IEnumerable<(FluentAssertionsCSharpSyntaxVisitor, BecauseArgumentsSyntaxVisitor)> Visitors
20+
protected override IEnumerable<FluentAssertionsCSharpSyntaxVisitor> Visitors
2221
{
2322
get
2423
{
25-
yield return (new CountShouldBeSyntaxVisitor(), new BecauseArgumentsSyntaxVisitor("Be", 1));
24+
yield return new CountShouldBeSyntaxVisitor();
2625
}
2726
}
2827

src/FluentAssertions.BestPractices/Tips/Collections/CollectionShouldHaveCountGreaterOrEqualTo.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using Microsoft.CodeAnalysis;
22
using Microsoft.CodeAnalysis.CodeFixes;
3-
using Microsoft.CodeAnalysis.CSharp;
43
using Microsoft.CodeAnalysis.CSharp.Syntax;
54
using Microsoft.CodeAnalysis.Diagnostics;
65
using System.Collections.Generic;
@@ -18,11 +17,11 @@ public class CollectionShouldHaveCountGreaterOrEqualToAnalyzer : FluentAssertion
1817
public const string Message = "Use {0} .Should() followed by ### instead.";
1918

2019
protected override DiagnosticDescriptor Rule => new DiagnosticDescriptor(DiagnosticId, Title, Message, Category, DiagnosticSeverity.Info, true);
21-
protected override IEnumerable<(FluentAssertionsCSharpSyntaxVisitor, BecauseArgumentsSyntaxVisitor)> Visitors
20+
protected override IEnumerable<FluentAssertionsCSharpSyntaxVisitor> Visitors
2221
{
2322
get
2423
{
25-
yield return (new CountShouldBeGreaterOrEqualToSyntaxVisitor(), new BecauseArgumentsSyntaxVisitor("BeGreaterOrEqualTo", 1));
24+
yield return new CountShouldBeGreaterOrEqualToSyntaxVisitor();
2625
}
2726
}
2827

src/FluentAssertions.BestPractices/Tips/Collections/CollectionShouldHaveCountGreaterThan.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ public class CollectionShouldHaveCountGreaterThanAnalyzer : FluentAssertionsAnal
1717
public const string Message = "Use {0} .Should() followed by .HaveCountGreaterThan() instead.";
1818

1919
protected override DiagnosticDescriptor Rule => new DiagnosticDescriptor(DiagnosticId, Title, Message, Category, DiagnosticSeverity.Info, true);
20-
protected override IEnumerable<(FluentAssertionsCSharpSyntaxVisitor, BecauseArgumentsSyntaxVisitor)> Visitors
20+
protected override IEnumerable<FluentAssertionsCSharpSyntaxVisitor> Visitors
2121
{
2222
get
2323
{
24-
yield return (new CountShouldBeGreaterThanSyntaxVisitor(), new BecauseArgumentsSyntaxVisitor("BeGreaterThan", 1));
24+
yield return new CountShouldBeGreaterThanSyntaxVisitor();
2525
}
2626
}
2727

0 commit comments

Comments
 (0)