Cortside.Common.Testing 6.3.458

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Cortside.Common.Testing --version 6.3.458                
NuGet\Install-Package Cortside.Common.Testing -Version 6.3.458                
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="6.3.458" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Cortside.Common.Testing --version 6.3.458                
#r "nuget: Cortside.Common.Testing, 6.3.458"                
#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.
// Install Cortside.Common.Testing as a Cake Addin
#addin nuget:?package=Cortside.Common.Testing&version=6.3.458

// Install Cortside.Common.Testing as a Cake Tool
#tool nuget:?package=Cortside.Common.Testing&version=6.3.458                

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 net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
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
6.4.464-develop 1,164 9/27/2024
6.4.463-merge-master 72 9/27/2024
6.4.462-develop 85 9/27/2024
6.4.461-pre-condition-failed 65 9/27/2024
6.4.460-pre-condition-failed 81 9/27/2024
6.4.454-develop 96 9/10/2024
6.4.425-develop 116 8/1/2024
6.3.458 1,469 9/25/2024
6.3.456 460 9/10/2024
6.3.455 238 9/10/2024
6.3.452 131 9/9/2024
6.3.444-release-6.3 198 8/5/2024
6.3.443-release-6.3 42 8/5/2024
6.3.441-release-6.3 53 8/2/2024
6.3.428-6.3 39 8/1/2024
6.3.427-6.3 57 8/1/2024
6.3.426-6.3 55 8/1/2024
6.3.424-6.3 43 8/1/2024
6.3.422-develop 449 7/31/2024
6.3.421-develop 656 7/23/2024
6.3.420-separate-aspnetcore 102 7/22/2024
6.3.419-separate-aspnetcore 111 7/22/2024
6.3.415-separate-exceptions 78 7/17/2024
6.3.414-separate-exceptions 69 7/17/2024
6.3.413-develop 150 4/24/2024
6.3.412-develop 100 4/23/2024
6.3.411-develop 105 4/23/2024
6.3.410-develop 1,272 3/25/2024
6.3.401-develop 157 1/9/2024
6.2.416-separate-aspnetcore 74 7/17/2024
6.2.408 1,947 1/16/2024
6.2.406 359 1/10/2024
6.2.403 207 1/9/2024
6.2.402-6.2 85 1/9/2024
6.2.400-6.2 79 1/9/2024
6.2.399-develop 148 12/22/2023
6.1.397 1,070 11/14/2023
6.1.393 100 11/10/2023
6.1.392 122 11/10/2023
6.1.390 170 11/8/2023
6.1.382-develop 102 11/8/2023
6.1.381-develop 109 11/1/2023
6.1.380-develop 140 10/16/2023
6.1.379-develop 184 9/12/2023