-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move usings to top of file and using file-scoped namespaces (#40)
* Move usings outside namespace * Rebaseline tests * Use file-scoped namespaces * Rebaseline tests
- Loading branch information
1 parent
0fb11a7
commit 3e12add
Showing
53 changed files
with
1,834 additions
and
1,875 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
...zers.Test/AbstractClassTests.ShouldPassIfGoodParametersAndFailOnTypeMismatch.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,25 @@ | ||
using Microsoft.CodeAnalysis.Diagnostics; | ||
using System.IO; | ||
using Microsoft.CodeAnalysis.Diagnostics; | ||
using TestHelper; | ||
using Xunit; | ||
|
||
namespace Moq.Analyzers.Test | ||
{ | ||
using System.IO; | ||
|
||
using TestHelper; | ||
|
||
using Xunit; | ||
namespace Moq.Analyzers.Test; | ||
|
||
public class AbstractClassTests : DiagnosticVerifier | ||
public class AbstractClassTests : DiagnosticVerifier | ||
{ | ||
[Fact] | ||
public Task ShouldPassIfGoodParametersAndFailOnTypeMismatch() | ||
{ | ||
[Fact] | ||
public Task ShouldPassIfGoodParametersAndFailOnTypeMismatch() | ||
{ | ||
return Verify(VerifyCSharpDiagnostic( | ||
[ | ||
File.ReadAllText("Data/AbstractClass.Good.cs"), | ||
File.ReadAllText("Data/AbstractClass.Bad.cs") | ||
] | ||
)); | ||
} | ||
return Verify(VerifyCSharpDiagnostic( | ||
[ | ||
File.ReadAllText("Data/AbstractClass.Good.cs"), | ||
File.ReadAllText("Data/AbstractClass.Bad.cs") | ||
] | ||
)); | ||
} | ||
|
||
protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer() | ||
{ | ||
return new ConstructorArgumentsShouldMatchAnalyzer(); | ||
} | ||
protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer() | ||
{ | ||
return new ConstructorArgumentsShouldMatchAnalyzer(); | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
...Analyzers.Test/AsAcceptOnlyInterfaceAnalyzerTests.ShouldPassIfGoodParameters.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 17 additions & 18 deletions
35
Source/Moq.Analyzers.Test/AsAcceptOnlyInterfaceAnalyzerTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
namespace Moq.Analyzers.Test | ||
{ | ||
using System.IO; | ||
using System.Threading.Tasks; | ||
using Microsoft.CodeAnalysis.Diagnostics; | ||
using TestHelper; | ||
using Xunit; | ||
using System.IO; | ||
using System.Threading.Tasks; | ||
using Microsoft.CodeAnalysis.Diagnostics; | ||
using TestHelper; | ||
using Xunit; | ||
|
||
namespace Moq.Analyzers.Test; | ||
|
||
public class AsAcceptOnlyInterfaceAnalyzerTests : DiagnosticVerifier | ||
public class AsAcceptOnlyInterfaceAnalyzerTests : DiagnosticVerifier | ||
{ | ||
[Fact] | ||
public Task ShouldPassIfGoodParameters() | ||
{ | ||
[Fact] | ||
public Task ShouldPassIfGoodParameters() | ||
{ | ||
return Verify(VerifyCSharpDiagnostic(File.ReadAllText("Data/AsAcceptOnlyInterface.cs"))); | ||
} | ||
return Verify(VerifyCSharpDiagnostic(File.ReadAllText("Data/AsAcceptOnlyInterface.cs"))); | ||
} | ||
|
||
protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer() | ||
{ | ||
return new AsShouldBeUsedOnlyForInterfaceAnalyzer(); | ||
} | ||
protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer() | ||
{ | ||
return new AsShouldBeUsedOnlyForInterfaceAnalyzer(); | ||
} | ||
} | ||
} |
8 changes: 4 additions & 4 deletions
8
...backSignatureShouldMatchMockedMethodAnalyzerTests.ShouldPassIfGoodParameters.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 17 additions & 18 deletions
35
Source/Moq.Analyzers.Test/CallbackSignatureShouldMatchMockedMethodAnalyzerTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
namespace Moq.Analyzers.Test | ||
{ | ||
using System.IO; | ||
using System.Threading.Tasks; | ||
using Microsoft.CodeAnalysis.Diagnostics; | ||
using TestHelper; | ||
using Xunit; | ||
using System.IO; | ||
using System.Threading.Tasks; | ||
using Microsoft.CodeAnalysis.Diagnostics; | ||
using TestHelper; | ||
using Xunit; | ||
|
||
namespace Moq.Analyzers.Test; | ||
|
||
public class CallbackSignatureShouldMatchMockedMethodAnalyzerTests : DiagnosticVerifier | ||
public class CallbackSignatureShouldMatchMockedMethodAnalyzerTests : DiagnosticVerifier | ||
{ | ||
[Fact] | ||
public Task ShouldPassIfGoodParameters() | ||
{ | ||
[Fact] | ||
public Task ShouldPassIfGoodParameters() | ||
{ | ||
return Verify(VerifyCSharpDiagnostic(File.ReadAllText("Data/CallbackSignatureShouldMatchMockedMethod.cs"))); | ||
} | ||
return Verify(VerifyCSharpDiagnostic(File.ReadAllText("Data/CallbackSignatureShouldMatchMockedMethod.cs"))); | ||
} | ||
|
||
protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer() | ||
{ | ||
return new CallbackSignatureShouldMatchMockedMethodAnalyzer(); | ||
} | ||
protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer() | ||
{ | ||
return new CallbackSignatureShouldMatchMockedMethodAnalyzer(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.