Skip to content

Commit

Permalink
Merge pull request nunit#4779 from stevenaw/4778-dependency-refresh
Browse files Browse the repository at this point in the history
Update the dependencies
  • Loading branch information
stevenaw authored Aug 18, 2024
2 parents fd76945 + 47195fc commit 2e436d7
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 17 deletions.
4 changes: 2 additions & 2 deletions CakeScripts.Tests/CakeScripts.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit3TestAdapter" version="4.5.0" />
<PackageReference Include="NUnit3TestAdapter" version="4.6.0" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
16 changes: 8 additions & 8 deletions src/NUnitFramework/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,30 @@
<!-- Packages for used features -->
<ItemGroup>
<PackageVersion Include="System.Collections.Immutable" Version="6.0.0" />
<PackageVersion Include="System.Memory" Version="4.5.4" />
<PackageVersion Include="System.Memory" Version="4.5.5" />
<PackageVersion Include="System.ValueTuple" version="4.5.0" />
</ItemGroup>
<!-- General Packages -->
<ItemGroup>
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageVersion Include="FSharp.Core" Version="7.0.200" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageVersion Include="FSharp.Core" Version="8.0.400" />
</ItemGroup>
<!-- Package to allow Nullability etc. in older SDKS -->
<ItemGroup>
<PackageVersion Include="IsExternalInit" Version="1.0.3" />
<PackageVersion Include="Nullable" Version="1.3.1" />
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="7.0.0" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageVersion Include="TunnelVisionLabs.ReferenceAssemblyAnnotator" Version="1.0.0-alpha.160" />
</ItemGroup>
<!-- Analyzers -->
<ItemGroup>
<PackageVersion Include="CSharpIsNullAnalyzer" Version="0.1.495" />
<PackageVersion Include="CSharpIsNullAnalyzer" Version="0.1.593" />
<PackageVersion Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="4.8.0" />
<PackageVersion Include="NUnit.Analyzers" Version="4.0.1" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="4.10.0" />
<PackageVersion Include="NUnit.Analyzers" Version="4.3.0" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.507" />
</ItemGroup>
<!-- Specific dependencies -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected override bool Matches(string? actual)
/// than <paramref name="comparisonType"/> was already set.</exception>
public SubstringConstraint Using(StringComparison comparisonType)
{
if (_comparisonType == null)
if (_comparisonType is null)
_comparisonType = comparisonType;
else if (_comparisonType != comparisonType)
throw new InvalidOperationException("A different comparison type was already set.");
Expand Down
4 changes: 2 additions & 2 deletions src/NUnitFramework/tests/Assertions/AssertThrowsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public void AssertThrowsDoesNotDiscardOutput()
Assert.Throws<Exception>(() =>
{
Console.WriteLine(2);
TestContext.WriteLine(3);
TestContext.Out.WriteLine(3);
throw new Exception("test");
});
Console.WriteLine(4);
Expand All @@ -39,7 +39,7 @@ public void ThrowsConstraintDoesNotDiscardOutput()
Assert.That(() =>
{
Console.WriteLine(2);
TestContext.WriteLine(3);
TestContext.Out.WriteLine(3);
throw new Exception("test");
},
Throws.Exception);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private void OutputReferenceId(string location)
}
}

TestContext.WriteLine($"{location}: {id}>");
TestContext.Out.WriteLine($"{location}: {id}>");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ public void CanWriteOutputToResult_Multiple_XmlOutput()
[Test]
public void WriteToTestContextOutput()
{
TestContext.WriteLine("This is a test!");
TestContext.WriteLine("The characters &, ', \", < and > must be escaped.");
TestContext.Out.WriteLine("This is a test!");
TestContext.Out.WriteLine("The characters &, ', \", < and > must be escaped.");
}

[Test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ public void WriteToConsole()

public void WriteToTestContext()
{
TestContext.WriteLine("RunsInAppDomain.WriteToTestContext");
TestContext.Out.WriteLine("RunsInAppDomain.WriteToTestContext");
}
}
#endif
Expand Down
4 changes: 4 additions & 0 deletions src/NUnitFramework/tests/TextOutputTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,18 @@ public void TestContextOut_WritesToResult()
[Test]
public void TestContextWrite_WritesToResult()
{
#pragma warning disable NUnit1033 // The Write methods on TestContext will be marked as Obsolete and eventually removed
TestContext.Write(SOME_TEXT);
#pragma warning restore NUnit1033 // The Write methods on TestContext will be marked as Obsolete and eventually removed
Assert.That(TextOutputTests.CapturedOutput, Is.EqualTo(SOME_TEXT));
}

[Test]
public void TestContextWriteLine_WritesToResult()
{
#pragma warning disable NUnit1033 // The Write methods on TestContext will be marked as Obsolete and eventually removed
TestContext.WriteLine(SOME_TEXT);
#pragma warning restore NUnit1033 // The Write methods on TestContext will be marked as Obsolete and eventually removed
Assert.That(Framework.Internal.TestExecutionContext.CurrentContext.CurrentResult.Output, Is.EqualTo(SOME_TEXT + NL));
}

Expand Down

0 comments on commit 2e436d7

Please sign in to comment.