Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .docfx/Dockerfile.docfx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nginx:1.27.1-alpine AS base
FROM nginx:1.27.3-alpine AS base
RUN rm -rf /usr/share/nginx/html/*

FROM codebeltnet/docfx:2.77.0 AS build
Expand Down
4 changes: 2 additions & 2 deletions .docfx/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dest": "api",
"filter": "filterConfig.yml",
"properties": {
"TargetFramework": "net8.0"
"TargetFramework": "net9.0"
}
}
],
Expand Down Expand Up @@ -47,7 +47,7 @@
],
"globalMetadata": {
"_appTitle": "Extensions for xUnit by Codebelt",
"_appFooter": "<span>Generated by <strong>DocFX</strong>. Copyright 2024 Geekle. All rights reserved.</span>",
"_appFooter": "<span>Generated by <strong>DocFX</strong>. Copyright 2024-2025 Geekle. All rights reserved.</span>",
"_appLogoPath": "images/50x50.png",
"_appFaviconPath": "images/favicon.ico",
"_googleAnalyticsTagId": "G-S3WBFFNKBL",
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ on:
- .docfx/**
- .nuget/**
- '**/*.md'
push:
branches: [main]
paths-ignore:
- .codecov/**
- .docfx/**
- .nuget/**
- '**/*.md'
workflow_dispatch:
inputs:
configuration:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
Version 9.0.0
Version 9.0.1
Availability: .NET 9 and .NET 8

# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs

Comment on lines +1 to +6
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Document breaking changes related to IHostingEnvironment.

The PR includes removal of obsolete IHostingEnvironment code, but this breaking change isn't documented in the release notes. Consider adding a "Breaking Changes" section to inform users about this significant change.

Add this section after the ALM entry:

# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs

+# Breaking Changes
+- REMOVED Obsolete IHostingEnvironment code in favor of IHostEnvironment
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Version 9.0.1
Availability: .NET 9 and .NET 8
 
# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs
 
Version 9.0.1
Availability: .NET 9 and .NET 8
# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs
# Breaking Changes
- REMOVED Obsolete IHostingEnvironment code in favor of IHostEnvironment
🧰 Tools
🪛 LanguageTool

[style] ~5-~5: ‘with respect to’ might be wordy. Consider a shorter alternative.
Context: ...GED Dependencies to latest and greatest with respect to TFMs
 
Version 9.0.0
Availability: ....

(EN_WORDINESS_PREMIUM_WITH_RESPECT_TO)

Version 9.0.0
Availability: .NET 9 and .NET 8

# ALM
Expand Down
14 changes: 13 additions & 1 deletion .nuget/Codebelt.Extensions.Xunit.Hosting/PackageReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
Version 9.0.0
Version 9.0.1
Availability: .NET 9, .NET 8 and .NET Standard 2.0

# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs

# Improvements
- CHANGED HostFixture class in the Codebelt.Extensions.Xunit.Hosting namespace no longer have a dependency to IHostingEnvironment (TFM netstandard2.0)
- CHANGED HostTest class in the Codebelt.Extensions.Xunit.Hosting namespace no longer have a dependency to IHostingEnvironment (TFM netstandard2.0)
- CHANGED IHostFixture interface in the Codebelt.Extensions.Xunit.Hosting namespace no longer have a dependency to IHostingEnvironment (TFM netstandard2.0)
- CHANGED IHostingEnvironmentTest interface in the Codebelt.Extensions.Xunit.Hosting namespace no longer have a dependency to IHostingEnvironment (TFM netstandard2.0)

Version 9.0.0
Availability: .NET 9, .NET 8 and .NET Standard 2.0

# ALM
Expand Down
8 changes: 7 additions & 1 deletion .nuget/Codebelt.Extensions.Xunit/PackageReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
Version 9.0.0
Version 9.0.1
Availability: .NET 9, .NET 8 and .NET Standard 2.0

# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs

Version 9.0.0
Availability: .NET 9, .NET 8 and .NET Standard 2.0

# ALM
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@ For more details, please refer to `PackageReleaseNotes.txt` on a per assembly ba
> [!NOTE]
> Changelog entries prior to version 8.4.0 was migrated from previous versions of Cuemon.Extensions.Xunit, Cuemon.Extensions.Xunit.Hosting, and Cuemon.Extensions.Xunit.Hosting.AspNetCore.

## [9.0.1] - 2025-01-25

This is a service update that primarily focuses on package dependencies and minor improvements.

> [!IMPORTANT]
> Dependencies used for targeting .NET Standard 2.0 has been updated to use .NET 8.0 (LTS) instead of .NET Core 2.1.

### Dependencies

- Codebelt.Extensions.Xunit updated to latest and greatest with respect to TFMs
- Codebelt.Extensions.Xunit.Hosting updated to latest and greatest with respect to TFMs
- Codebelt.Extensions.Xunit.Hosting.AspNetCore updated to latest and greatest with respect to TFMs

### Changed

- HostFixture class in the Codebelt.Extensions.Xunit.Hosting namespace no longer have a dependency to IHostingEnvironment (TFM netstandard2.0)
- HostTest class in the Codebelt.Extensions.Xunit.Hosting namespace no longer have a dependency to IHostingEnvironment (TFM netstandard2.0)
- IHostFixture interface in the Codebelt.Extensions.Xunit.Hosting namespace no longer have a dependency to IHostingEnvironment (TFM netstandard2.0)
- IHostingEnvironmentTest interface in the Codebelt.Extensions.Xunit.Hosting namespace no longer have a dependency to IHostingEnvironment (TFM netstandard2.0)

## [9.0.0] - 2024-11-13

This major release is first and foremost focused on ironing out any wrinkles that have been introduced with .NET 9 preview releases so the final release is production ready together with the official launch from Microsoft.
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<PropertyGroup Condition="'$(IsTestProject)' == 'false'">
<TargetFrameworks>net9.0;net8.0;netstandard2.0</TargetFrameworks>
<Copyright>Copyright © Geekle 2024. All rights reserved.</Copyright>
<Copyright>Copyright © Geekle 2024-2025. All rights reserved.</Copyright>
<Authors>gimlichael</Authors>
<Company>Geekle</Company>
<Product>Extensions for xUnit API by Codebelt</Product>
Expand Down
41 changes: 17 additions & 24 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,37 @@
<PackageVersion Include="Cuemon.Core" Version="9.0.0" />
<PackageVersion Include="Cuemon.Extensions.AspNetCore" Version="9.0.0" />
<PackageVersion Include="Cuemon.Extensions.IO" Version="9.0.0" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="MinVer" Version="6.0.0" />
<PackageVersion Include="NativeLibraryLoader" Version="1.0.13" />
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.6.0" />
<PackageVersion Include="Xunit.Priority" Version="1.1.6" />
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
<PackageVersion Include="coverlet.msbuild" Version="6.0.2" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
<PackageVersion Include="coverlet.msbuild" Version="6.0.4" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.abstractions" Version="2.0.3" />
<PackageVersion Include="xunit.assert" Version="2.9.2" />
<PackageVersion Include="xunit.extensibility.core" Version="2.9.2" />
<PackageVersion Include="xunit.runner.console" Version="2.9.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageVersion Include="xunit.assert" Version="2.9.3" />
<PackageVersion Include="xunit.extensibility.core" Version="2.9.3" />
<PackageVersion Include="xunit.runner.console" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.1" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('net9'))">
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.FileExtensions" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="9.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="9.0.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration.FileExtensions" Version="9.0.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="9.0.1" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="9.0.1" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="9.0.1" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('net8'))">
<ItemGroup Condition="$(TargetFramework.StartsWith('net8')) OR $(TargetFramework.StartsWith('netstandard2'))">
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="8.0.10" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard2'))">
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="2.1.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="2.1.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="2.1.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration.FileExtensions" Version="2.1.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="2.1.1" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="8.0.12" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Geekle
Copyright (c) 2024-2025 Geekle

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
17 changes: 0 additions & 17 deletions src/Codebelt.Extensions.Xunit.Hosting/HostFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,21 +97,12 @@ protected static bool HasTypes(Type type, params Type[] types)
return false;
}

#if NETSTANDARD2_0_OR_GREATER
/// <summary>
/// Gets or sets the delegate that initializes the test class.
/// </summary>
/// <value>The delegate that initializes the test class.</value>
/// <remarks>Mimics the Startup convention.</remarks>
public Action<IConfiguration, IHostingEnvironment> ConfigureCallback { get; set; }
#else
/// <summary>
/// Gets or sets the delegate that initializes the test class.
/// </summary>
/// <value>The delegate that initializes the test class.</value>
/// <remarks>Mimics the Startup convention.</remarks>
public Action<IConfiguration, IHostEnvironment> ConfigureCallback { get; set; }
#endif

/// <summary>
/// Gets or sets the delegate that initializes the host builder.
Expand Down Expand Up @@ -143,19 +134,11 @@ protected static bool HasTypes(Type type, params Type[] types)
/// <value>The <see cref="IConfiguration" /> initialized by this instance.</value>
public IConfiguration Configuration { get; protected set; }

#if NETSTANDARD2_0_OR_GREATER
/// <summary>
/// Gets the <see cref="IHostingEnvironment"/> initialized by this instance.
/// </summary>
/// <value>The <see cref="IHostingEnvironment"/> initialized by this instance.</value>
public IHostingEnvironment HostingEnvironment { get; protected set; }
#else
/// <summary>
/// Gets the <see cref="IHostEnvironment"/> initialized by this instance.
/// </summary>
/// <value>The <see cref="IHostEnvironment"/> initialized by this instance.</value>
public IHostEnvironment HostingEnvironment { get; protected set; }
#endif

/// <summary>
/// Gets a value indicating whether this <see cref="HostFixture"/> object is disposed.
Expand Down
25 changes: 0 additions & 25 deletions src/Codebelt.Extensions.Xunit.Hosting/HostTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
protected HostTest(T hostFixture, ITestOutputHelper output = null, Type callerType = null) : base(output, callerType)
{
if (hostFixture == null) { throw new ArgumentNullException(nameof(hostFixture)); }
InitializeHostFixture(hostFixture);

Check warning on line 28 in src/Codebelt.Extensions.Xunit.Hosting/HostTest.cs

View workflow job for this annotation

GitHub Actions / 🔬 Code Quality Analysis

Remove this call from a constructor to the overridable 'InitializeHostFixture' method. (https://rules.sonarsource.com/csharp/RSPEC-1699)

Check warning on line 28 in src/Codebelt.Extensions.Xunit.Hosting/HostTest.cs

View workflow job for this annotation

GitHub Actions / 🔬 Code Quality Analysis

Remove this call from a constructor to the overridable 'InitializeHostFixture' method. (https://rules.sonarsource.com/csharp/RSPEC-1699)

Check warning on line 28 in src/Codebelt.Extensions.Xunit.Hosting/HostTest.cs

View workflow job for this annotation

GitHub Actions / 🔬 Code Quality Analysis

Remove this call from a constructor to the overridable 'InitializeHostFixture' method. (https://rules.sonarsource.com/csharp/RSPEC-1699)

Check warning on line 28 in src/Codebelt.Extensions.Xunit.Hosting/HostTest.cs

View workflow job for this annotation

GitHub Actions / 🔬 Code Quality Analysis

Remove this call from a constructor to the overridable 'InitializeHostFixture' method. (https://rules.sonarsource.com/csharp/RSPEC-1699)

Check warning on line 28 in src/Codebelt.Extensions.Xunit.Hosting/HostTest.cs

View workflow job for this annotation

GitHub Actions / 🔬 Code Quality Analysis

Remove this call from a constructor to the overridable 'InitializeHostFixture' method. (https://rules.sonarsource.com/csharp/RSPEC-1699)

Check warning on line 28 in src/Codebelt.Extensions.Xunit.Hosting/HostTest.cs

View workflow job for this annotation

GitHub Actions / 🔬 Code Quality Analysis

Remove this call from a constructor to the overridable 'InitializeHostFixture' method. (https://rules.sonarsource.com/csharp/RSPEC-1699)
}

/// <summary>
Expand Down Expand Up @@ -68,17 +68,6 @@
private set;
}

#if NETSTANDARD2_0_OR_GREATER
/// <summary>
/// Gets the <see cref="IHostingEnvironment"/> initialized by the <see cref="IHost"/>.
/// </summary>
/// <value>The <see cref="IHostingEnvironment"/> initialized by the <see cref="IHost"/>.</value>
public IHostingEnvironment HostingEnvironment
{
get;
private set;
}
#else
/// <summary>
/// Gets the <see cref="IHostEnvironment"/> initialized by the <see cref="IHost"/>.
/// </summary>
Expand All @@ -88,20 +77,7 @@
get;
private set;
}
#endif

#if NETSTANDARD2_0_OR_GREATER
/// <summary>
/// Adds <see cref="Configuration"/> and <see cref="HostingEnvironment"/> to this instance.
/// </summary>
/// <param name="configuration">The <see cref="IConfiguration"/> initialized by the <see cref="IHost"/>.</param>
/// <param name="environment">The <see cref="IHostingEnvironment"/> initialized by the <see cref="IHost"/>.</param>
public virtual void Configure(IConfiguration configuration, IHostingEnvironment environment)
{
Configuration = configuration;
HostingEnvironment = environment;
}
#else
/// <summary>
/// Adds <see cref="Configuration"/> and <see cref="HostingEnvironment"/> to this instance.
/// </summary>
Expand All @@ -112,7 +88,6 @@
Configuration = configuration;
HostingEnvironment = environment;
}
#endif

/// <summary>
/// Provides a way to override the <see cref="IHostBuilder"/> defaults set up by <typeparamref name="T"/>.
Expand Down
11 changes: 0 additions & 11 deletions src/Codebelt.Extensions.Xunit.Hosting/IHostFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@

namespace Codebelt.Extensions.Xunit.Hosting
{
#if NETSTANDARD2_0_OR_GREATER
public partial interface IHostFixture
{
/// <summary>
/// Gets or sets the delegate that adds configuration and environment information to a <see cref="HostTest{T}"/>.
/// </summary>
/// <value>The delegate that adds configuration and environment information to a <see cref="HostTest{T}"/>.</value>
Action<IConfiguration, IHostingEnvironment> ConfigureCallback { get; set; }
}
#else
public partial interface IHostFixture
{
/// <summary>
Expand All @@ -23,7 +13,6 @@ public partial interface IHostFixture
/// <value>The delegate that adds configuration and environment information to a <see cref="HostTest{T}"/>.</value>
Action<IConfiguration, IHostEnvironment> ConfigureCallback { get; set; }
}
#endif

/// <summary>
/// Provides a way to use Microsoft Dependency Injection in unit tests.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,10 @@ namespace Codebelt.Extensions.Xunit.Hosting
/// </summary>
public interface IHostingEnvironmentTest
{
#if NETSTANDARD2_0_OR_GREATER
/// <summary>
/// Gets the <see cref="IHostingEnvironment"/> initialized by the <see cref="IHost"/>.
/// </summary>
/// <value>The <see cref="IHostingEnvironment"/> initialized by the <see cref="IHost"/>.</value>
IHostingEnvironment HostingEnvironment { get; }
#else
/// <summary>
/// Gets the <see cref="IHostEnvironment"/> initialized by the <see cref="IHost"/>.
/// </summary>
/// <value>The <see cref="IHostEnvironment"/> initialized by the <see cref="IHost"/>.</value>
IHostEnvironment HostingEnvironment { get; }
#endif
}
}
2 changes: 1 addition & 1 deletion testenvironments.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{
"name": "Docker-Ubuntu",
"type": "docker",
"dockerImage": "gimlichael/ubuntu-testrunner:net8.0.404-9.0.100"
"dockerImage": "gimlichael/ubuntu-testrunner:net8.0.405-9.0.102"
}
]
}
Loading