Encamina.Enmarcha.Testing
8.1.5-preview-06
See the version list below for details.
dotnet add package Encamina.Enmarcha.Testing --version 8.1.5-preview-06
NuGet\Install-Package Encamina.Enmarcha.Testing -Version 8.1.5-preview-06
<PackageReference Include="Encamina.Enmarcha.Testing" Version="8.1.5-preview-06" />
paket add Encamina.Enmarcha.Testing --version 8.1.5-preview-06
#r "nuget: Encamina.Enmarcha.Testing, 8.1.5-preview-06"
// Install Encamina.Enmarcha.Testing as a Cake Addin #addin nuget:?package=Encamina.Enmarcha.Testing&version=8.1.5-preview-06&prerelease // Install Encamina.Enmarcha.Testing as a Cake Tool #tool nuget:?package=Encamina.Enmarcha.Testing&version=8.1.5-preview-06&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.4.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 | 74 | 10/22/2024 |
8.2.0-preview-01-m01 | 108 | 9/17/2024 |
8.1.9-preview-03 | 59 | 11/19/2024 |
8.1.9-preview-02 | 70 | 10/22/2024 |
8.1.9-preview-01 | 72 | 10/4/2024 |
8.1.8 | 94 | 9/23/2024 |
8.1.8-preview-07 | 73 | 9/12/2024 |
8.1.8-preview-06 | 87 | 9/11/2024 |
8.1.8-preview-05 | 86 | 9/10/2024 |
8.1.8-preview-04 | 111 | 8/16/2024 |
8.1.8-preview-03 | 113 | 8/13/2024 |
8.1.8-preview-02 | 100 | 8/13/2024 |
8.1.8-preview-01 | 94 | 8/12/2024 |
8.1.7 | 100 | 8/7/2024 |
8.1.7-preview-09 | 66 | 7/3/2024 |
8.1.7-preview-08 | 85 | 7/2/2024 |
8.1.7-preview-07 | 81 | 6/10/2024 |
8.1.7-preview-06 | 77 | 6/10/2024 |
8.1.7-preview-05 | 104 | 6/6/2024 |
8.1.7-preview-04 | 92 | 6/6/2024 |
8.1.7-preview-03 | 96 | 5/24/2024 |
8.1.7-preview-02 | 82 | 5/10/2024 |
8.1.7-preview-01 | 102 | 5/8/2024 |
8.1.6 | 134 | 5/7/2024 |
8.1.6-preview-08 | 47 | 5/2/2024 |
8.1.6-preview-07 | 97 | 4/29/2024 |
8.1.6-preview-06 | 99 | 4/26/2024 |
8.1.6-preview-05 | 104 | 4/24/2024 |
8.1.6-preview-04 | 86 | 4/22/2024 |
8.1.6-preview-03 | 96 | 4/22/2024 |
8.1.6-preview-02 | 93 | 4/17/2024 |
8.1.6-preview-01 | 108 | 4/15/2024 |
8.1.5 | 125 | 4/15/2024 |
8.1.5-preview-15 | 99 | 4/10/2024 |
8.1.5-preview-14 | 107 | 3/20/2024 |
8.1.5-preview-13 | 82 | 3/18/2024 |
8.1.5-preview-12 | 104 | 3/13/2024 |
8.1.5-preview-11 | 96 | 3/13/2024 |
8.1.5-preview-10 | 124 | 3/13/2024 |
8.1.5-preview-09 | 103 | 3/12/2024 |
8.1.5-preview-08 | 95 | 3/12/2024 |
8.1.5-preview-07 | 105 | 3/8/2024 |
8.1.5-preview-06 | 90 | 3/8/2024 |
8.1.5-preview-05 | 97 | 3/7/2024 |
8.1.5-preview-04 | 70 | 3/7/2024 |
8.1.5-preview-03 | 92 | 3/7/2024 |
8.1.5-preview-02 | 94 | 2/28/2024 |
8.1.5-preview-01 | 111 | 2/19/2024 |
8.1.4 | 138 | 2/15/2024 |
8.1.3 | 137 | 2/13/2024 |
8.1.3-preview-07 | 101 | 2/13/2024 |
8.1.3-preview-06 | 87 | 2/12/2024 |
8.1.3-preview-05 | 112 | 2/9/2024 |
8.1.3-preview-04 | 89 | 2/8/2024 |
8.1.3-preview-03 | 97 | 2/7/2024 |
8.1.3-preview-02 | 84 | 2/2/2024 |
8.1.3-preview-01 | 92 | 2/2/2024 |
8.1.2 | 133 | 2/1/2024 |
8.1.2-preview-9 | 87 | 1/22/2024 |
8.1.2-preview-8 | 83 | 1/19/2024 |
8.1.2-preview-7 | 78 | 1/19/2024 |
8.1.2-preview-6 | 78 | 1/19/2024 |
8.1.2-preview-5 | 69 | 1/19/2024 |
8.1.2-preview-4 | 76 | 1/19/2024 |
8.1.2-preview-3 | 85 | 1/18/2024 |
8.1.2-preview-2 | 69 | 1/18/2024 |
8.1.2-preview-16 | 75 | 1/31/2024 |
8.1.2-preview-15 | 69 | 1/31/2024 |
8.1.2-preview-14 | 90 | 1/25/2024 |
8.1.2-preview-13 | 85 | 1/25/2024 |
8.1.2-preview-12 | 90 | 1/23/2024 |
8.1.2-preview-11 | 91 | 1/23/2024 |
8.1.2-preview-10 | 94 | 1/22/2024 |
8.1.2-preview-1 | 69 | 1/18/2024 |
8.1.1 | 129 | 1/18/2024 |
8.1.0 | 99 | 1/18/2024 |
8.0.3 | 147 | 12/29/2023 |
8.0.1 | 123 | 12/14/2023 |
8.0.0 | 120 | 12/7/2023 |
6.0.4.3 | 107 | 12/29/2023 |
6.0.4.2 | 138 | 12/20/2023 |
6.0.4.1 | 96 | 12/19/2023 |
6.0.4 | 139 | 12/4/2023 |
6.0.3.20 | 154 | 11/27/2023 |
6.0.3.19 | 122 | 11/22/2023 |