Cortside.Common.Testing
6.2.408
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Cortside.Common.Testing --version 6.2.408
NuGet\Install-Package Cortside.Common.Testing -Version 6.2.408
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.2.408" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Cortside.Common.Testing --version 6.2.408
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Cortside.Common.Testing, 6.2.408"
#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.2.408 // Install Cortside.Common.Testing as a Cake Tool #tool nuget:?package=Cortside.Common.Testing&version=6.2.408
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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 | Versions 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.
-
net6.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Logging (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- Microsoft.NET.Test.Sdk (>= 17.8.0)
- xunit (>= 2.6.5)
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 | 858 | 9/27/2024 |
6.4.463-merge-master | 69 | 9/27/2024 |
6.4.462-develop | 80 | 9/27/2024 |
6.4.461-pre-condition-failed | 62 | 9/27/2024 |
6.4.460-pre-condition-failed | 78 | 9/27/2024 |
6.4.454-develop | 91 | 9/10/2024 |
6.4.425-develop | 109 | 8/1/2024 |
6.3.458 | 1,073 | 9/25/2024 |
6.3.456 | 429 | 9/10/2024 |
6.3.455 | 227 | 9/10/2024 |
6.3.452 | 124 | 9/9/2024 |
6.3.444-release-6.3 | 194 | 8/5/2024 |
6.3.443-release-6.3 | 39 | 8/5/2024 |
6.3.441-release-6.3 | 49 | 8/2/2024 |
6.3.428-6.3 | 36 | 8/1/2024 |
6.3.427-6.3 | 50 | 8/1/2024 |
6.3.426-6.3 | 52 | 8/1/2024 |
6.3.424-6.3 | 38 | 8/1/2024 |
6.3.422-develop | 446 | 7/31/2024 |
6.3.421-develop | 653 | 7/23/2024 |
6.3.420-separate-aspnetcore | 99 | 7/22/2024 |
6.3.419-separate-aspnetcore | 104 | 7/22/2024 |
6.3.415-separate-exceptions | 72 | 7/17/2024 |
6.3.414-separate-exceptions | 66 | 7/17/2024 |
6.3.413-develop | 145 | 4/24/2024 |
6.3.412-develop | 97 | 4/23/2024 |
6.3.411-develop | 101 | 4/23/2024 |
6.3.410-develop | 1,268 | 3/25/2024 |
6.3.401-develop | 154 | 1/9/2024 |
6.2.416-separate-aspnetcore | 70 | 7/17/2024 |
6.2.408 | 1,864 | 1/16/2024 |
6.2.406 | 354 | 1/10/2024 |
6.2.403 | 202 | 1/9/2024 |
6.2.402-6.2 | 81 | 1/9/2024 |
6.2.400-6.2 | 76 | 1/9/2024 |
6.2.399-develop | 143 | 12/22/2023 |
6.1.397 | 1,065 | 11/14/2023 |
6.1.393 | 95 | 11/10/2023 |
6.1.392 | 117 | 11/10/2023 |
6.1.390 | 164 | 11/8/2023 |
6.1.382-develop | 99 | 11/8/2023 |
6.1.381-develop | 106 | 11/1/2023 |
6.1.380-develop | 137 | 10/16/2023 |
6.1.379-develop | 179 | 9/12/2023 |