MisterJames / GenFu

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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Configuring Inheritted Class Not Working

zhengbli opened this issue · comments

This might be related to #25, but still exist in the latetst release.

void Main()
{
	GenFu.GenFu.Configure<Question>().Fill(q => q.NormalizedEmail, q => q.Email);
	var t = A.ListOf<Question>(20);
        t.Dump();
}

public class Base
{
	public string Email { get; set; }
	public string NormalizedEmail { get; set; }
}
public class Question: Base
{
	public string Id { get; set; }
}

Result
default

GenFu Version 1.3.3.

This was fixed in v1.6.0