Skip to content

Commit

Permalink
refactor: add name for params
Browse files Browse the repository at this point in the history
  • Loading branch information
get-me-power committed Jan 24, 2024
1 parent 70568cd commit c721656
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using MSTestAssert = Microsoft.VisualStudio.TestTools.UnitTesting.Assert;



namespace Dena.CodeAnalysis.CSharp.Testing
{
[TestClass]
Expand All @@ -14,7 +13,7 @@ public async Task Format()
{
var diagnostics = await DiagnosticAnalyzerRunner.Run(
new NullAnalyzer(),
ExampleCode.ContainingSyntaxError
codes: ExampleCode.ContainingSyntaxError
);

var actual = DiagnosticsFormatter.Format(diagnostics);
Expand Down
2 changes: 1 addition & 1 deletion tests/Dena.CodeAnalysis.Testing.Tests/LocationFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public static async Task<Location> Create()
{
var ds = await DiagnosticAnalyzerRunner.Run(
new NullAnalyzer(),
ExampleCode.ContainingSyntaxError
codes: ExampleCode.ContainingSyntaxError
);
return ds[0].Location;
}
Expand Down
3 changes: 1 addition & 2 deletions tests/Dena.CodeAnalysis.Testing.Tests/SpyAnalyzerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using MSTestAssert = Microsoft.VisualStudio.TestTools.UnitTesting.Assert;



namespace Dena.CodeAnalysis.CSharp.Testing
{
[TestClass]
Expand All @@ -17,7 +16,7 @@ public async Task WhenGivenAnyCodes_RecordAllActionHistory()
var builder = new StringBuilder();
var failed = false;

await DiagnosticAnalyzerRunner.Run(spy, ExampleCode.DiagnosticsFreeClassLibrary);
await DiagnosticAnalyzerRunner.Run(spy, codes: ExampleCode.DiagnosticsFreeClassLibrary);

if (0 == spy.CodeBlockActionHistory.Count)
{
Expand Down
25 changes: 12 additions & 13 deletions tests/Dena.CodeAnalysis.Testing.Tests/StubAnalyzerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using MSTestAssert = Microsoft.VisualStudio.TestTools.UnitTesting.Assert;



namespace Dena.CodeAnalysis.CSharp.Testing
{
[TestClass]
Expand All @@ -20,7 +19,7 @@ public async Task WhenGivenAnyCodes_ItShouldGetToCallCodeBlockAction()
}
);

await DiagnosticAnalyzerRunner.Run(stubAnalyzer, ExampleCode.DiagnosticsFreeClassLibrary);
await DiagnosticAnalyzerRunner.Run(stubAnalyzer, codes: ExampleCode.DiagnosticsFreeClassLibrary);

MSTestAssert.AreNotEqual(0, callCount);
}
Expand All @@ -37,7 +36,7 @@ public async Task WhenGivenAnyCodes_ItShouldGetToCallCodeBlockStartAction()
}
);

await DiagnosticAnalyzerRunner.Run(stubAnalyzer, ExampleCode.DiagnosticsFreeClassLibrary);
await DiagnosticAnalyzerRunner.Run(stubAnalyzer, codes: ExampleCode.DiagnosticsFreeClassLibrary);

MSTestAssert.AreNotEqual(0, callCount);
}
Expand All @@ -54,7 +53,7 @@ public async Task WhenGivenAnyCodes_ItShouldGetToCallCompilationAction()
}
);

await DiagnosticAnalyzerRunner.Run(stubAnalyzer, ExampleCode.DiagnosticsFreeClassLibrary);
await DiagnosticAnalyzerRunner.Run(stubAnalyzer, codes: ExampleCode.DiagnosticsFreeClassLibrary);

MSTestAssert.AreNotEqual(0, callCount);
}
Expand All @@ -71,7 +70,7 @@ public async Task WhenGivenAnyCodes_ItShouldGetToCallCompilationStartAction()
}
);

await DiagnosticAnalyzerRunner.Run(stubAnalyzer, ExampleCode.DiagnosticsFreeClassLibrary);
await DiagnosticAnalyzerRunner.Run(stubAnalyzer, codes: ExampleCode.DiagnosticsFreeClassLibrary);

MSTestAssert.AreNotEqual(0, callCount);
}
Expand All @@ -88,7 +87,7 @@ public async Task WhenGivenAnyCodes_ItShouldGetToCallOperationAction()
}
);

await DiagnosticAnalyzerRunner.Run(stubAnalyzer, ExampleCode.DiagnosticsFreeClassLibrary);
await DiagnosticAnalyzerRunner.Run(stubAnalyzer, codes: ExampleCode.DiagnosticsFreeClassLibrary);

MSTestAssert.AreNotEqual(0, callCount);
}
Expand All @@ -105,7 +104,7 @@ public async Task WhenGivenAnyCodes_ItShouldGetToCallOperationBlockAction()
}
);

await DiagnosticAnalyzerRunner.Run(stubAnalyzer, ExampleCode.DiagnosticsFreeClassLibrary);
await DiagnosticAnalyzerRunner.Run(stubAnalyzer, codes: ExampleCode.DiagnosticsFreeClassLibrary);

MSTestAssert.AreNotEqual(0, callCount);
}
Expand All @@ -122,7 +121,7 @@ public async Task WhenGivenAnyCodes_ItShouldGetToCallOperationBlockStartAction()
}
);

await DiagnosticAnalyzerRunner.Run(stubAnalyzer, ExampleCode.DiagnosticsFreeClassLibrary);
await DiagnosticAnalyzerRunner.Run(stubAnalyzer, codes: ExampleCode.DiagnosticsFreeClassLibrary);

MSTestAssert.AreNotEqual(0, callCount);
}
Expand All @@ -139,7 +138,7 @@ public async Task WhenGivenAnyCodes_ItShouldGetToCallSemanticModelAction()
}
);

await DiagnosticAnalyzerRunner.Run(stubAnalyzer, ExampleCode.DiagnosticsFreeClassLibrary);
await DiagnosticAnalyzerRunner.Run(stubAnalyzer, codes: ExampleCode.DiagnosticsFreeClassLibrary);

MSTestAssert.AreNotEqual(0, callCount);
}
Expand All @@ -156,7 +155,7 @@ public async Task WhenGivenAnyCodes_ItShouldGetToCallSymbolAction()
}
);

await DiagnosticAnalyzerRunner.Run(stubAnalyzer, ExampleCode.DiagnosticsFreeClassLibrary);
await DiagnosticAnalyzerRunner.Run(stubAnalyzer, codes: ExampleCode.DiagnosticsFreeClassLibrary);

MSTestAssert.AreNotEqual(0, callCount);
}
Expand All @@ -173,7 +172,7 @@ public async Task WhenGivenAnyCodes_ItShouldGetToCallSymbolStartAction()
}
);

await DiagnosticAnalyzerRunner.Run(stubAnalyzer, ExampleCode.DiagnosticsFreeClassLibrary);
await DiagnosticAnalyzerRunner.Run(stubAnalyzer, codes: ExampleCode.DiagnosticsFreeClassLibrary);

MSTestAssert.AreNotEqual(0, callCount);
}
Expand All @@ -190,7 +189,7 @@ public async Task WhenGivenAnyCodes_ItShouldGetToCallSyntaxNodeAction()
}
);

await DiagnosticAnalyzerRunner.Run(stubAnalyzer, ExampleCode.DiagnosticsFreeClassLibrary);
await DiagnosticAnalyzerRunner.Run(stubAnalyzer, codes: ExampleCode.DiagnosticsFreeClassLibrary);

MSTestAssert.AreNotEqual(0, callCount);
}
Expand All @@ -207,7 +206,7 @@ public async Task WhenGivenAnyCodes_ItShouldGetToCallSyntaxTreeAction()
}
);

await DiagnosticAnalyzerRunner.Run(stubAnalyzer, ExampleCode.DiagnosticsFreeClassLibrary);
await DiagnosticAnalyzerRunner.Run(stubAnalyzer, codes: ExampleCode.DiagnosticsFreeClassLibrary);

MSTestAssert.AreNotEqual(0, callCount);
}
Expand Down

0 comments on commit c721656

Please sign in to comment.