TestDataFramework.dll 3.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package TestDataFramework.dll --version 3.0.1
NuGet\Install-Package TestDataFramework.dll -Version 3.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="TestDataFramework.dll" Version="3.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TestDataFramework.dll --version 3.0.1
#r "nuget: TestDataFramework.dll, 3.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 TestDataFramework.dll as a Cake Addin
#addin nuget:?package=TestDataFramework.dll&version=3.0.1

// Install TestDataFramework.dll as a Cake Tool
#tool nuget:?package=TestDataFramework.dll&version=3.0.1

This is a unit testing tool. It randomizes values in your classes automatically so you don't need to do data entry.

This tool includes the optional ability to write out objects to a database for tests which involve data access.

To get an object value quickly:

IPopulator memoryPopulator = StaticPopulatorFactory.CreateMemoryPopulator();

SubjectClass subject = memoryPopulator.Add<SubjectClass>().Make();

// Or

// Makes five objects
IEnumerable<SubjectClass> subjectSet = memoryPopulator.Add<SubjectClass>(5).Make();

The above example uses the in-memory populator.

DON'T use the Make() or MakeAndBind() methods with the SQL Server populator unless you know what you are doing. They will write to the database immediately.

Go to the Wiki for more.

Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  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. 
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 531 10/16/2023
4.0.0 465 10/14/2023
3.7.0 1,201 5/21/2022
3.6.2 1,138 5/17/2022
3.6.1 1,118 5/17/2022
3.6.0 1,164 5/17/2022
3.5.3 1,280 9/25/2021
3.5.1 1,566 3/31/2019
3.5.0 1,382 3/3/2019
3.4.1 1,504 2/20/2019
3.4.0 1,478 2/19/2019
3.3.5 1,545 12/1/2018
3.3.4 1,519 11/26/2018
3.3.3 1,400 11/22/2018
3.3.2 1,566 11/5/2018
3.3.1 1,523 11/2/2018
3.3.0 1,454 10/29/2018
3.2.1 1,569 10/25/2018
3.2.0 1,532 10/25/2018
3.1.4 1,586 10/9/2018
3.1.3 1,573 10/9/2018
3.1.2 1,587 10/8/2018
3.1.1 1,546 9/22/2018
3.0.1 1,657 8/26/2018
2.4.0 1,989 1/22/2018
2.2.4 1,668 1/19/2018
2.2.3.4 1,819 1/12/2018
2.2.3.2 1,772 12/13/2017
2.2.2 1,835 12/9/2017
2.2.1 1,770 12/4/2017
2.2.0 1,710 11/22/2017
2.1.0 2,156 10/30/2017
2.0.4.4 1,620 7/11/2017
2.0.4.3 1,506 7/9/2017
2.0.4.2 1,416 7/9/2017
2.0.4.1 1,437 7/9/2017
2.0.4 1,465 7/6/2017
2.0.3 1,447 7/2/2017
2.0.2 1,594 1/9/2017
2.0.1 1,596 12/7/2016


       3.0
       *   - Deep setting of properties.
       
           - Deep setting of object graph properties beyond a collection.
           
           - Make an object in one line via Make and BindAndMake.
           
           - Ignore a property (to avoid possible side effects).
           
           - Exclusive range of possible values for a property.
           
           - Take and Skip operations for control of what subsets of a collection explicit setters apply to.
           
           - Better encapsulation. Less public/protected member exposure.
   
2.4
* Bug fixes:
Value type and enum constructor parameters were not being populated.
Unsigned integer properties were causing code to break.

2.3.1
* Bug fix. Constructor finder was finding a constructor for a string with a char array parameter.
Was trying to invoke it. Now circumventing this for value/string types and arrays.
Populating those constructor arguments directly.

2.3
* Populator will now attempt to resolve constructor with parameters.
Constructors are attempted from least number of parameters (including zero) to most number of parameters.

2.2.4.0
* Bug fix. When calling deferred value generator, was including record references that were not populatable, and therefore null.
This was causing a null reference exception when the generator tried to access a method (GetType()) off the null record.

2.2.3.4
* Ability to ignore properties. Useful to avoid side effects of properties with logic in the setter.
New RecordObjects convenience property on the OperableList<T> result collection type. Instead of
user having to write the LINQ statement to select out the RecordObjects.

2.2.3.2
* All setters on a property are executed in turn.

2.2.3.1
* Support for enums

2.2.2.0

* Bug fix. A combination of explicit/deep property setting and collections in the target object were
causing a null ref exception.

2.2.1.0

* Fixed bug in deep explicit property setting, same issue as in 2.0.4.4. It's a relatively rare edge case.
Calling Make/BindAndMake on an operable list will call the persistence layer only once for entire list.
Was calling once per element. Will save database round trips when DB populator is used.

2.2.0.0

* Deep explicit setting of properties.

2.1.0.0

* Introduction of the ability to get a value immediately by calling Make() or BindAndMake().
This is without needing to call IPopulator.Bind() separately to get values on the whole set
of requested objects.

2.0.4.4

* Bug Fix. Setting explicit value off of an interface didn't identify the concrete object's
actual (derived) type. Under these conditions, properties weren't being explicitly set
on the object instance.

2.0.4.3

* Assembly version properties correction.

2.0.4.2

* Syncing C# and Sql Server DateTime values for the Sql Server populator.
Milliseconds were being truncated on Sql Server but not in C#.

2.0.4.1

* Extra guard when accessing types from assemblies to be scanned.
Was throwing a ReflectionTypeLoadException for a particular assembly/type.

2.0.4

* Bug fix: Guid / uniqueidentifier in Sql Server now supported.

2.0.3

* Foreign keys can be explicitly set. Framework will not enforce referential integrity for those
properties if so.

Allows you to set a foreign key to null if the matching primary key table isn't in the C# model.
Referential integrity errors on the database server can occur if you introduce them this way.

* Internal methods/members of public facing types are marked as internal (or internal protected)
to reduce user's intellisense noise.

* Skipping assemblies that are not found in the file system during scannig of referenced
assemblies for primary/foreign table class matches. An exception had been occuring for some
assemblies, possibly becasue they were not in the bin folder due to being in the GAC.

* Adding an AppSettings key to explicitly enable or disable log messages. The key is:
"TestDataFramework-EnableLogger". The value to enable logging is "true".

2.0.2

Documentation is up to date on GitHub.

*  Guarantee methods work with primary keys properly.

2.0.1.

* RecordReference.Set method fix.

* Guarantee... methods fix.