fm.Extensions.Testing.DependencyInjection.MSTest 4.0.0

Provides a MSTest base class for tests based on Microsoft.Extensions.DependencyInjection. Use common Startup.cs patterns like ConfigureServices(...) and Configure(...) to setup your tests.
This extends ServiceTestsBase by adding the TestContext properties to configuration and enabling TestContext logging.

Commonly used types:

Examples see

public sealed class ExampleTests : ServiceTests
   protected override void ConfigureConfiguration([NotNull] IConfigurationBuilder configuration)

       // Add additional configuration here
               new KeyValuePair<string, string>("ConfigKey", "ConfigValue"),

   protected override void ConfigureLogging([NotNull] ILoggingBuilder builder)

       // Add additional loggers or configuration
       builder.AddFilter(logLevel => true);

   protected override void ConfigureServices([NotNull] IServiceCollection services)

       // Configure your services here
       // services.AddSingleton<IMyService, MyService>();

   public void ExampleTest()
       // Use your DI container as you would during runtime
       // IMyService service = this.GetRequiredService<IMyService>();

There is a newer version of this package available.
See the version list below for details.
Install-Package fm.Extensions.Testing.DependencyInjection.MSTest -Version 4.0.0
dotnet add package fm.Extensions.Testing.DependencyInjection.MSTest --version 4.0.0
<PackageReference Include="fm.Extensions.Testing.DependencyInjection.MSTest" Version="4.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add fm.Extensions.Testing.DependencyInjection.MSTest --version 4.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

* BREAKING CHANGE: Incorporate breaking change in
* BREAKING CHANGE: Rename TestInitialize/TestCleanup (ServiceTests) to ServiceTestInitialize/ServiceTestCleanup

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
4.1.0 37 10/23/2019
4.0.0 53 9/4/2019
4.0.0-preview.2 76 2/26/2019
4.0.0-preview.1 60 2/26/2019
3.0.0 3,925 10/12/2017
2.0.0 215 10/9/2017
1.0.0 360 2/27/2017