Skip to content

Latest commit

 

History

History
36 lines (32 loc) · 1.08 KB

README.md

File metadata and controls

36 lines (32 loc) · 1.08 KB

AutoBuilderCore

AutoBuilder is a .Net Core library that makes easy creation of objects graphs filled of data. It is a tool for building unit tests arranges.

Usage

using AutoBuilder;
// ...
var builder = new Builder<MyModel>()
    .WithStringsMaxSized(50)           // strings with max size of 50
    .WithStringsAlphabet("abcdef...")  // strings using only those specific characters
    .WithMinNumberValueOf(1)           // numbers with min value of 1
    .WithMaxNumberValueOf(10);         // numbers with max value of 10

var myClassInstance = builder.Build(); // model instance generated respecting the config above

Features

  1. Build a full graph of a class with properties filled
  2. String size
  3. Specific string alphabet
  4. Number range
  5. Circular reference protection
  6. Collection support
  7. Enum support

Supported Types

  1. User defined types
  2. string (propertyname + GUID)
  3. int, short, long, char, byte (random numbers)
  4. float, double, decimal (random float numbers)
  5. Nullable
  6. bool
  7. DateTime
  8. IEnumerable, IList, List, Array
  9. Enums