Marktek.Fluent.Testing.Engine 2.0.0.1

There is a newer version of this package available.
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
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="Marktek.Fluent.Testing.Engine" Version="2.0.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Marktek.Fluent.Testing.Engine --version 2.0.0.1
#r "nuget: Marktek.Fluent.Testing.Engine, 2.0.0.1"
#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 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 502 1/19/2021
4.0.0 383 1/18/2021
3.0.0.5 434 11/27/2020
3.0.0.4 1,040 11/17/2020
3.0.0.2 615 10/15/2020
3.0.0.1 398 10/15/2020
2.0.0.3 2,923 2/20/2020
2.0.0.2 469 2/18/2020
2.0.0.1 984 1/31/2020
1.0.0.19 493 1/30/2020
1.0.0.18 484 1/22/2020
1.0.0.17 479 1/15/2020
1.0.0.16 480 1/14/2020
1.0.0.15 662 1/10/2020
1.0.0.12 562 1/8/2020
1.0.0.11 551 1/7/2020
1.0.0.8 478 1/3/2020
1.0.0.6 506 9/25/2019
1.0.0.5 504 9/20/2019
1.0.0.3 493 9/6/2019