Closed unklyf closed 6 years ago
Hi @unklyf which version was exhibiting this issue? I tried with the latest and these tests passed
[Fact]
public void An_enum_should_be_filled_with_configuration()
{
A.Configure<BlogPost>().Fill(x => x.Type)
.WithRandom(new BlogTypeEnum[] { BlogTypeEnum.Update, BlogTypeEnum.ProductRelease });
var post = A.New<BlogPost>();
Assert.True(post.Type == BlogTypeEnum.Update || post.Type == BlogTypeEnum.ProductRelease);
}
Code to reproduce :
A.Configure<Person>().Fill(x => x.Gender).WithRandom(new Gender[] { Gender.Male, Gender.Female }))
Gender is an enum where Male = 1 and Female = 2The person gender property is always fill to zero.