Fix IDE0090 (#2211)

This commit is contained in:
Cory Miller
2022-10-18 10:54:08 -04:00
committed by GitHub
parent daba735b52
commit b87b4aac5c
99 changed files with 412 additions and 412 deletions

View File

@@ -11,7 +11,7 @@ namespace GitHub.Runner.Common.Tests.Util
[Trait("Category", "Common")]
public void Equal_MatchesObjectEquality()
{
using (TestHostContext hc = new TestHostContext(this))
using (TestHostContext hc = new(this))
{
Tracing trace = hc.GetTrace();
@@ -29,12 +29,12 @@ namespace GitHub.Runner.Common.Tests.Util
[Trait("Category", "Common")]
public void Equal_MatchesReferenceEquality()
{
using (TestHostContext hc = new TestHostContext(this))
using (TestHostContext hc = new(this))
{
Tracing trace = hc.GetTrace();
// Arrange.
object expected = new object();
object expected = new();
object actual = expected;
// Act/Assert.
@@ -47,7 +47,7 @@ namespace GitHub.Runner.Common.Tests.Util
[Trait("Category", "Common")]
public void Equal_MatchesStructEquality()
{
using (TestHostContext hc = new TestHostContext(this))
using (TestHostContext hc = new(this))
{
Tracing trace = hc.GetTrace();
@@ -65,12 +65,12 @@ namespace GitHub.Runner.Common.Tests.Util
[Trait("Category", "Common")]
public void Equal_ThrowsWhenActualObjectIsNull()
{
using (TestHostContext hc = new TestHostContext(this))
using (TestHostContext hc = new(this))
{
Tracing trace = hc.GetTrace();
// Arrange.
object expected = new object();
object expected = new();
object actual = null;
// Act/Assert.
@@ -86,13 +86,13 @@ namespace GitHub.Runner.Common.Tests.Util
[Trait("Category", "Common")]
public void Equal_ThrowsWhenExpectedObjectIsNull()
{
using (TestHostContext hc = new TestHostContext(this))
using (TestHostContext hc = new(this))
{
Tracing trace = hc.GetTrace();
// Arrange.
object expected = null;
object actual = new object();
object actual = new();
// Act/Assert.
Assert.Throws<ArgumentOutOfRangeException>(() =>
@@ -107,13 +107,13 @@ namespace GitHub.Runner.Common.Tests.Util
[Trait("Category", "Common")]
public void Equal_ThrowsWhenObjectsAreNotEqual()
{
using (TestHostContext hc = new TestHostContext(this))
using (TestHostContext hc = new(this))
{
Tracing trace = hc.GetTrace();
// Arrange.
object expected = new object();
object actual = new object();
object expected = new();
object actual = new();
// Act/Assert.
Assert.Throws<ArgumentOutOfRangeException>(() =>
@@ -128,7 +128,7 @@ namespace GitHub.Runner.Common.Tests.Util
[Trait("Category", "Common")]
public void Equal_ThrowsWhenStructsAreNotEqual()
{
using (TestHostContext hc = new TestHostContext(this))
using (TestHostContext hc = new(this))
{
Tracing trace = hc.GetTrace();