Cortside.Common.Testing 8.0.482

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Cortside.Common.Testing --version 8.0.482
                    
NuGet\Install-Package Cortside.Common.Testing -Version 8.0.482
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Cortside.Common.Testing" Version="8.0.482" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cortside.Common.Testing" Version="8.0.482" />
                    
Directory.Packages.props
<PackageReference Include="Cortside.Common.Testing" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Cortside.Common.Testing --version 8.0.482
                    
#r "nuget: Cortside.Common.Testing, 8.0.482"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Cortside.Common.Testing@8.0.482
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Cortside.Common.Testing&version=8.0.482
                    
Install as a Cake Addin
#tool nuget:?package=Cortside.Common.Testing&version=8.0.482
                    
Install as a Cake Tool

Cortside.Common.Testing

  • Update nuget dependencies to latest stable versions
  • Add ScopedLocalTimeZone for use with tests to set predictable timezone regardless of environment
    using (new ScopedLocalTimeZone(TimeZoneInfo.FindSystemTimeZoneById("UTC+12"))) {
        var localDateTime = new DateTime(2020, 12, 31, 23, 59, 59, DateTimeKind.Local);
        var utcDateTime = TimeZoneInfo.ConvertTimeToUtc(localDateTime);
    
        Assert.Equal("UTC+12", TimeZoneInfo.Local.Id);
        Assert.Equal(utcDateTime.AddHours(12), localDateTime);
    }
    
  • Add XunitLogger for capturing log output to xUnit's ITestOutputHelper
    // Create a logger factory with a debug provider
    loggerFactory = LoggerFactory.Create(builder => {
        builder
            .SetMinimumLevel(LogLevel.Trace)
            .AddFilter("Microsoft", LogLevel.Warning)
            .AddFilter("System", LogLevel.Warning)
            .AddFilter("Cortside.Common", LogLevel.Trace)
            .AddXunit(output);
    });
    
    // Create a logger with the category name of the current class
    var logger = loggerFactory.CreateLogger<XunitLoggerTest>();
    
    ... user logger as you would any other logger ...
    
  • changed hierarchichal organization of loggers, so LogEventLogger has new namespace of Cortside.Common.Testing.Logging.LogEvent
  • Added helper class RandomValues for generating "random" data
  • Added IServiceCollection extension method Unregister<T> for unregistering something already in service collection
    // Remove the app's DbContext registration.
    services.Unregister<DbContextOptions<DatabaseContext>>();
    services.Unregister<DbContext>();
    
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Cortside.Common.Testing:

Package Downloads
Cortside.AspNetCore.Testing

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.1.500-develop 226 8/6/2025
8.1.499-copilot-instructions 205 8/6/2025
8.1.498-copilot-instructions 199 8/6/2025
8.1.497-copilot-instructions 203 8/6/2025
8.1.496-develop 200 8/6/2025
8.1.495-copilot-instructions 202 8/6/2025
8.1.494-copilot-instructions 205 8/6/2025
8.1.493-EBSVC-3503 202 8/5/2025
8.1.492-EBSVC-3503 202 8/5/2025
8.1.491-EBSVC-3503 202 8/5/2025
8.1.490-messageexception-se... 206 8/5/2025
8.1.489-messageexception-se... 207 8/5/2025
8.1.488-messageexception-se... 187 8/5/2025
8.1.487-EBSVC-3503 179 8/4/2025
8.1.486-EBSVC-3503 169 8/4/2025
8.1.485-EBSVC-3503 171 8/4/2025
8.1.484-EBSVC-3503 171 8/4/2025
8.1.483-EBSVC-3503 136 6/4/2025
8.1.477-develop 152 3/14/2025
8.0.482 338 5/29/2025
8.0.480 1,196 4/7/2025
8.0.479-monitoredhostedservice 165 4/1/2025
8.0.478 1,615 3/17/2025
8.0.476-8.0 146 3/14/2025
8.0.475-develop 146 3/14/2025
8.0.474-develop 118 2/19/2025
8.0.473-develop 383 2/14/2025
8.0.472-develop 98 2/14/2025
6.4.470-develop 118 2/7/2025
6.4.469-develop 154 2/7/2025
6.4.468-develop 107 2/4/2025
6.4.465-develop 428 12/31/2024
6.4.464-develop 1,945 9/27/2024
6.4.463-merge-master 95 9/27/2024
6.4.462-develop 107 9/27/2024
6.4.461-pre-condition-failed 87 9/27/2024
6.4.460-pre-condition-failed 105 9/27/2024
6.4.454-develop 115 9/10/2024
6.4.425-develop 141 8/1/2024
6.3.458 3,559 9/25/2024
6.3.456 631 9/10/2024
6.3.455 295 9/10/2024
6.3.452 173 9/9/2024
6.3.444-release-6.3 219 8/5/2024
6.3.443-release-6.3 60 8/5/2024
6.3.441-release-6.3 73 8/2/2024
6.3.428-6.3 56 8/1/2024
6.3.427-6.3 80 8/1/2024
6.3.426-6.3 81 8/1/2024
6.3.424-6.3 69 8/1/2024
6.3.422-develop 480 7/31/2024
6.3.421-develop 675 7/23/2024
6.3.420-separate-aspnetcore 123 7/22/2024
6.3.419-separate-aspnetcore 131 7/22/2024
6.3.415-separate-exceptions 99 7/17/2024
6.3.414-separate-exceptions 93 7/17/2024
6.3.413-develop 171 4/24/2024
6.3.412-develop 120 4/23/2024
6.3.411-develop 126 4/23/2024
6.3.410-develop 1,291 3/25/2024
6.3.401-develop 176 1/9/2024
6.2.416-separate-aspnetcore 98 7/17/2024
6.2.408 2,405 1/16/2024
6.2.406 391 1/10/2024
6.2.403 251 1/9/2024
6.2.402-6.2 108 1/9/2024
6.2.400-6.2 96 1/9/2024
6.2.399-develop 163 12/22/2023
6.1.397 1,093 11/14/2023
6.1.393 121 11/10/2023
6.1.392 138 11/10/2023
6.1.390 196 11/8/2023
6.1.382-develop 118 11/8/2023
6.1.381-develop 127 11/1/2023
6.1.380-develop 163 10/16/2023
6.1.379-develop 207 9/12/2023