mirror of
https://github.com/actions/runner.git
synced 2025-12-30 05:21:41 +08:00
Fix IDE0090 (#2211)
This commit is contained in:
@@ -14,7 +14,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
[Trait("Category", "Worker")]
|
||||
public void Constructor_AppliesMaskHints()
|
||||
{
|
||||
using (TestHostContext hc = new TestHostContext(this))
|
||||
using (TestHostContext hc = new(this))
|
||||
{
|
||||
// Arrange.
|
||||
var copy = new Dictionary<string, VariableValue>
|
||||
@@ -36,7 +36,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
[Trait("Category", "Worker")]
|
||||
public void Constructor_HandlesNullValue()
|
||||
{
|
||||
using (TestHostContext hc = new TestHostContext(this))
|
||||
using (TestHostContext hc = new(this))
|
||||
{
|
||||
// Arrange.
|
||||
var copy = new Dictionary<string, VariableValue>
|
||||
@@ -59,7 +59,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
[Trait("Category", "Worker")]
|
||||
public void Constructor_SetsNullAsEmpty()
|
||||
{
|
||||
using (TestHostContext hc = new TestHostContext(this))
|
||||
using (TestHostContext hc = new(this))
|
||||
{
|
||||
// Arrange.
|
||||
var copy = new Dictionary<string, VariableValue>
|
||||
@@ -80,7 +80,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
[Trait("Category", "Worker")]
|
||||
public void Constructor_SetsOrdinalIgnoreCaseComparer()
|
||||
{
|
||||
using (TestHostContext hc = new TestHostContext(this))
|
||||
using (TestHostContext hc = new(this))
|
||||
{
|
||||
// Arrange.
|
||||
CultureInfo currentCulture = CultureInfo.CurrentCulture;
|
||||
@@ -115,7 +115,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
[Trait("Category", "Worker")]
|
||||
public void Constructor_SkipVariableWithEmptyName()
|
||||
{
|
||||
using (TestHostContext hc = new TestHostContext(this))
|
||||
using (TestHostContext hc = new(this))
|
||||
{
|
||||
// Arrange.
|
||||
var copy = new Dictionary<string, VariableValue>
|
||||
@@ -139,7 +139,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
[Trait("Category", "Worker")]
|
||||
public void Get_ReturnsNullIfNotFound()
|
||||
{
|
||||
using (TestHostContext hc = new TestHostContext(this))
|
||||
using (TestHostContext hc = new(this))
|
||||
{
|
||||
// Arrange.
|
||||
var variables = new Variables(hc, new Dictionary<string, VariableValue>());
|
||||
@@ -157,7 +157,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
[Trait("Category", "Worker")]
|
||||
public void GetBoolean_DoesNotThrowWhenNull()
|
||||
{
|
||||
using (TestHostContext hc = new TestHostContext(this))
|
||||
using (TestHostContext hc = new(this))
|
||||
{
|
||||
// Arrange.
|
||||
var variables = new Variables(hc, new Dictionary<string, VariableValue>());
|
||||
@@ -175,7 +175,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
[Trait("Category", "Worker")]
|
||||
public void GetEnum_DoesNotThrowWhenNull()
|
||||
{
|
||||
using (TestHostContext hc = new TestHostContext(this))
|
||||
using (TestHostContext hc = new(this))
|
||||
{
|
||||
// Arrange.
|
||||
var variables = new Variables(hc, new Dictionary<string, VariableValue>());
|
||||
|
||||
Reference in New Issue
Block a user