Encamina.Enmarcha.Testing
8.1.9-preview-02
See the version list below for details.
dotnet add package Encamina.Enmarcha.Testing --version 8.1.9-preview-02
NuGet\Install-Package Encamina.Enmarcha.Testing -Version 8.1.9-preview-02
<PackageReference Include="Encamina.Enmarcha.Testing" Version="8.1.9-preview-02" />
paket add Encamina.Enmarcha.Testing --version 8.1.9-preview-02
#r "nuget: Encamina.Enmarcha.Testing, 8.1.9-preview-02"
// Install Encamina.Enmarcha.Testing as a Cake Addin #addin nuget:?package=Encamina.Enmarcha.Testing&version=8.1.9-preview-02&prerelease // Install Encamina.Enmarcha.Testing as a Cake Tool #tool nuget:?package=Encamina.Enmarcha.Testing&version=8.1.9-preview-02&prerelease
Testing
This project provides utilities to facilitate testing.
Setup
Nuget package
First, install NuGet. Then, install Encamina.Enmarcha.Testing from the package manager console:
PM> Install-Package Encamina.Enmarcha.Testing
.NET CLI:
Install .NET CLI. Next, install Encamina.Enmarcha.Testing from the .NET CLI:
dotnet add package Encamina.Enmarcha.Testing
How to use
FakeProvider
FakeProvider provides a faker component that replace external dependencies or values in-place to run tests with an expect or particular outcome. This faker provided is powered by Bogus.
Although you can instantiate a FakeProvider
in your tests, if you are using xUnit, the simplest approach is to use a Collection Fixture
and share the FakeProvider
across your different test classes. For this purpose, the auxiliary class FakerProviderFixturedBase is provided, which implements the IFakerProviderFixture. Here is a simple example:
[CollectionDefinition(MagicStrings.FixturesCollection)]
public class FixturesCollection : ICollectionFixture<FakerProvider>
{
// This class has no code, and is never created. Its purpose is simply
// to be the place to apply [CollectionDefinition] and all the
// ICollectionFixture<> interfaces.
}
[Collection(MagicStrings.FixturesCollection)]
public class TestClass1 : FakerProviderFixturedBase
{
public TestClass1(FakerProvider fakerFixture) : base(fakerFixture)
{
}
[Fact]
public void DummyTest()
{
// ...
var faker = FakerProvider.GetFaker();
// faker.Address
// ...
}
}
[Collection(MagicStrings.FixturesCollection)]
public class TestClass2 : FakerProviderFixturedBase
{
public TestClass2(FakerProvider fakerFixture) : base(fakerFixture)
{
}
[Fact]
public void OtherDummyTest()
{
// ...
var faker = FakerProvider.GetFaker();
// faker.Company
// ...
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Bogus (>= 35.6.1)
- CommunityToolkit.Diagnostics (>= 8.2.2)
- Microsoft.Extensions.Options (>= 8.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
8.2.0 | 65 | 10/22/2024 |
8.2.0-preview-01-m01 | 105 | 9/17/2024 |
8.1.9-preview-02 | 67 | 10/22/2024 |
8.1.9-preview-01 | 69 | 10/4/2024 |
8.1.8 | 89 | 9/23/2024 |
8.1.8-preview-07 | 70 | 9/12/2024 |
8.1.8-preview-06 | 84 | 9/11/2024 |
8.1.8-preview-05 | 83 | 9/10/2024 |
8.1.8-preview-04 | 108 | 8/16/2024 |
8.1.8-preview-03 | 110 | 8/13/2024 |
8.1.8-preview-02 | 97 | 8/13/2024 |
8.1.8-preview-01 | 91 | 8/12/2024 |
8.1.7 | 95 | 8/7/2024 |
8.1.7-preview-09 | 63 | 7/3/2024 |
8.1.7-preview-08 | 82 | 7/2/2024 |
8.1.7-preview-07 | 78 | 6/10/2024 |
8.1.7-preview-06 | 74 | 6/10/2024 |
8.1.7-preview-05 | 99 | 6/6/2024 |
8.1.7-preview-04 | 89 | 6/6/2024 |
8.1.7-preview-03 | 93 | 5/24/2024 |
8.1.7-preview-02 | 79 | 5/10/2024 |
8.1.7-preview-01 | 99 | 5/8/2024 |
8.1.6 | 129 | 5/7/2024 |
8.1.6-preview-08 | 44 | 5/2/2024 |
8.1.6-preview-07 | 94 | 4/29/2024 |
8.1.6-preview-06 | 96 | 4/26/2024 |
8.1.6-preview-05 | 103 | 4/24/2024 |
8.1.6-preview-04 | 85 | 4/22/2024 |
8.1.6-preview-03 | 95 | 4/22/2024 |
8.1.6-preview-02 | 92 | 4/17/2024 |
8.1.6-preview-01 | 107 | 4/15/2024 |
8.1.5 | 122 | 4/15/2024 |
8.1.5-preview-15 | 98 | 4/10/2024 |
8.1.5-preview-14 | 106 | 3/20/2024 |
8.1.5-preview-13 | 81 | 3/18/2024 |
8.1.5-preview-12 | 101 | 3/13/2024 |
8.1.5-preview-11 | 93 | 3/13/2024 |
8.1.5-preview-10 | 123 | 3/13/2024 |
8.1.5-preview-09 | 102 | 3/12/2024 |
8.1.5-preview-08 | 94 | 3/12/2024 |
8.1.5-preview-07 | 104 | 3/8/2024 |
8.1.5-preview-06 | 87 | 3/8/2024 |
8.1.5-preview-05 | 96 | 3/7/2024 |
8.1.5-preview-04 | 69 | 3/7/2024 |
8.1.5-preview-03 | 91 | 3/7/2024 |
8.1.5-preview-02 | 93 | 2/28/2024 |
8.1.5-preview-01 | 110 | 2/19/2024 |
8.1.4 | 135 | 2/15/2024 |
8.1.3 | 134 | 2/13/2024 |
8.1.3-preview-07 | 100 | 2/13/2024 |
8.1.3-preview-06 | 86 | 2/12/2024 |
8.1.3-preview-05 | 111 | 2/9/2024 |
8.1.3-preview-04 | 88 | 2/8/2024 |
8.1.3-preview-03 | 96 | 2/7/2024 |
8.1.3-preview-02 | 83 | 2/2/2024 |
8.1.3-preview-01 | 91 | 2/2/2024 |
8.1.2 | 126 | 2/1/2024 |
8.1.2-preview-9 | 86 | 1/22/2024 |
8.1.2-preview-8 | 82 | 1/19/2024 |
8.1.2-preview-7 | 77 | 1/19/2024 |
8.1.2-preview-6 | 77 | 1/19/2024 |
8.1.2-preview-5 | 68 | 1/19/2024 |
8.1.2-preview-4 | 73 | 1/19/2024 |
8.1.2-preview-3 | 84 | 1/18/2024 |
8.1.2-preview-2 | 68 | 1/18/2024 |
8.1.2-preview-16 | 74 | 1/31/2024 |
8.1.2-preview-15 | 68 | 1/31/2024 |
8.1.2-preview-14 | 89 | 1/25/2024 |
8.1.2-preview-13 | 82 | 1/25/2024 |
8.1.2-preview-12 | 89 | 1/23/2024 |
8.1.2-preview-11 | 90 | 1/23/2024 |
8.1.2-preview-10 | 93 | 1/22/2024 |
8.1.2-preview-1 | 66 | 1/18/2024 |
8.1.1 | 126 | 1/18/2024 |
8.1.0 | 94 | 1/18/2024 |
8.0.3 | 144 | 12/29/2023 |
8.0.1 | 120 | 12/14/2023 |
8.0.0 | 117 | 12/7/2023 |
6.0.4.3 | 104 | 12/29/2023 |
6.0.4.2 | 135 | 12/20/2023 |
6.0.4.1 | 91 | 12/19/2023 |
6.0.4 | 136 | 12/4/2023 |
6.0.3.20 | 151 | 11/27/2023 |
6.0.3.19 | 115 | 11/22/2023 |