Cortside.Common.Testing
6.3.427-6.3
This is a prerelease version of Cortside.Common.Testing.
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.3.427-6.3
NuGet\Install-Package Cortside.Common.Testing -Version 6.3.427-6.3
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.427-6.3" />
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.427-6.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Cortside.Common.Testing, 6.3.427-6.3"
#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.427-6.3&prerelease // Install Cortside.Common.Testing as a Cake Tool #tool nuget:?package=Cortside.Common.Testing&version=6.3.427-6.3&prerelease
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.1)
- Microsoft.Extensions.Logging (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.1)
- Microsoft.NET.Test.Sdk (>= 17.10.0)
- xunit (>= 2.9.0)
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,242 | 3 months ago |
6.4.463-merge-master | 74 | 3 months ago |
6.4.462-develop | 85 | 3 months ago |
6.4.461-pre-condition-failed | 65 | 3 months ago |
6.4.460-pre-condition-failed | 83 | 3 months ago |
6.4.454-develop | 96 | 4 months ago |
6.4.425-develop | 116 | 5 months ago |
6.3.458 | 1,617 | 3 months ago |
6.3.456 | 476 | 4 months ago |
6.3.455 | 238 | 4 months ago |
6.3.452 | 131 | 4 months ago |
6.3.444-release-6.3 | 198 | 5 months ago |
6.3.443-release-6.3 | 44 | 5 months ago |
6.3.441-release-6.3 | 53 | 5 months ago |
6.3.428-6.3 | 39 | 5 months ago |
6.3.427-6.3 | 57 | 5 months ago |
6.3.426-6.3 | 55 | 5 months ago |
6.3.424-6.3 | 45 | 5 months ago |
6.3.422-develop | 451 | 5 months ago |
6.3.421-develop | 656 | 5 months ago |
6.3.420-separate-aspnetcore | 102 | 5 months ago |
6.3.419-separate-aspnetcore | 111 | 5 months ago |
6.3.415-separate-exceptions | 78 | 5 months ago |
6.3.414-separate-exceptions | 69 | 5 months ago |
6.3.413-develop | 150 | 8 months ago |
6.3.412-develop | 100 | 8 months ago |
6.3.411-develop | 105 | 8 months ago |
6.3.410-develop | 1,272 | 9 months ago |
6.3.401-develop | 157 | 1/9/2024 |
6.2.416-separate-aspnetcore | 76 | 5 months ago |
6.2.408 | 2,009 | 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 |