Marktek.Fluent.Testing.Engine
2.0.0.1
See the version list below for details.
dotnet add package Marktek.Fluent.Testing.Engine --version 2.0.0.1
NuGet\Install-Package Marktek.Fluent.Testing.Engine -Version 2.0.0.1
<PackageReference Include="Marktek.Fluent.Testing.Engine" Version="2.0.0.1" />
paket add Marktek.Fluent.Testing.Engine --version 2.0.0.1
#r "nuget: Marktek.Fluent.Testing.Engine, 2.0.0.1"
// Install Marktek.Fluent.Testing.Engine as a Cake Addin #addin nuget:?package=Marktek.Fluent.Testing.Engine&version=2.0.0.1 // Install Marktek.Fluent.Testing.Engine as a Cake Tool #tool nuget:?package=Marktek.Fluent.Testing.Engine&version=2.0.0.1
#Github Repo https://github.com/markcunninghamuk/MarkTek.FluentApi.Testing
Introduction (v1.0.0.15 onwards)
A flexible engine allowing you to focus on reusable components and removing the need to have messy, unreadable tests. Scenarios where you will consider using it:
- Data-based testing
- Enforcing maximum reuse of test scenarios (Single Responsibility Principle)
- Readable tests
- Complex domains where entity behavior is highly coupled
- You require test code to match production grade
- You require a standard approach to testing
- Fluent API, making it more focused
- Parallel test executions, most approaches load data at the start and wipe at the end, but for parallel runs this is not always a good approach
Note One thing to mention here, is you will need to know C# to use the framework.
Getting Started
To get started you will need to install the nuget package using the command
Install-Package Marktek.Fluent.Testing.Engine -Version 1.0.0.15
Once you start you need to know 1 thing: what is the data type of the primary key of your entities. In most cases for example databases, it is a big int. In systems like Dynamics 365 and Salesforce, it could be a Guid.
To get started you need to instantiate a RecordService
. The RecordService
is a generic class that allows you to pass in the datatype you are working with.
Example
My system uses Guids on the record and I require to create a record. When you create a new RecordService
, you must pass in an AggregateId
, The AggregateId
is used to cleandown and the end, and is also the identifier of the parent record that you will create. Everything hangs off an aggregate in a relational database model. For NoSQL databases, you don't need to worry as much as you can create a complex object in one hit.
var service = new RecordService<Guid>(Guid.NewGuid());
Once you have instantiated the service you can call the following Methods, below is an example of what a test should typically look like
var service = new RecordService<Guid>(Guid.NewGuid());
service
.CreateRecord(new ActiveOrder(service.AggregateId))
.AssignAggregateId()
.If(DateTime.Now.Hour > 15, x => x.CreateRelatedRecord(new OrderLine(Guid.NewGuid())))
.ExecuteAction(new SetShippingDate())
.Delay(5000)
.ExecuteActionOnAggregate(new CancelOrder())
.Delay(1000)
.AssertAgainst(new MustBeCancelled())
.Cleanup(new Cleanup());
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 | netcoreapp2.0 was computed. netcoreapp2.1 is compatible. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net45 is compatible. net451 is compatible. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 2.1
- structuremap (>= 4.7.1)
-
.NETFramework 4.5
- structuremap (>= 4.7.1)
-
.NETFramework 4.5.1
- structuremap (>= 4.7.1)
-
.NETStandard 2.0
- structuremap (>= 4.7.1)
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 | |
---|---|---|---|
5.0.0 | 539 | 1/19/2021 | |
4.0.0 | 417 | 1/18/2021 | |
3.0.0.5 | 460 | 11/27/2020 | |
3.0.0.4 | 1,073 | 11/17/2020 | |
3.0.0.2 | 646 | 10/15/2020 | |
3.0.0.1 | 422 | 10/15/2020 | |
2.0.0.3 | 3,046 | 2/20/2020 | |
2.0.0.2 | 492 | 2/18/2020 | |
2.0.0.1 | 1,009 | 1/31/2020 | |
1.0.0.19 | 505 | 1/30/2020 | |
1.0.0.18 | 505 | 1/22/2020 | |
1.0.0.17 | 501 | 1/15/2020 | |
1.0.0.16 | 503 | 1/14/2020 | |
1.0.0.15 | 686 | 1/10/2020 | |
1.0.0.12 | 585 | 1/8/2020 | |
1.0.0.11 | 575 | 1/7/2020 | |
1.0.0.8 | 500 | 1/3/2020 | |
1.0.0.6 | 530 | 9/25/2019 | |
1.0.0.5 | 522 | 9/20/2019 | |
1.0.0.3 | 532 | 9/6/2019 |