A .NET library for generating realistic test data by automatically populating object properties with smart defaults.
GenFu is a .NET library that automatically generates realistic test data for objects. It uses reflection to identify properties and fills them with contextually appropriate values, such as names, ages, and titles, from an internal database or random data. This helps developers quickly create mock data for testing, prototyping, and seeding databases without manual setup.
.NET developers writing unit tests, building prototypes, or needing to seed databases with realistic sample data.
GenFu saves time by eliminating the need to manually create test data, provides smart defaults for common property names, and offers extensive customization through hints and overrides for precise control over generated values.
GenFu is a library you can use to generate realistic test data. It is composed of several property fillers that can populate commonly named properties through reflection using an internal database of values or randomly created data. You can override any of the fillers, give GenFu hints on how to fill them.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically fills common property names like FirstName and Age with realistic values from an internal database, eliminating manual mock data creation as shown in the Person class example.
Allows overriding fillers with custom functions or hints, such as setting age ranges with .WithinRange(), providing precise control over generated data without complex setup.
Simplifies creating collections of test objects with A.ListOf<T>(), defaulting to 25 items, ideal for testing scenarios requiring multiple instances efficiently.
Extends data generation to one-parameter setter methods using MethodFill, accommodating classes that use methods for property setting, as demonstrated with SetMiddleName.
Relies on reflection to analyze and fill properties, which can slow down data generation in performance-sensitive applications compared to compile-time approaches.
Struggles with generating consistent data across related properties, such as email addresses matching names, as admitted in the README's 'More To Come' section on object self-awareness.
Requires explicit setup with MethodFill for setter methods, unlike automatic property filling, adding extra steps and complexity for classes relying on methods.