Considering the following model
public class CalculatedValue
{
//...
public ItemsChoiceType[] ItemsElementName { get; set; }
}
public enum ItemsChoiceType
{
Value1,
Value2,
//...
ValueN
}
Will the following code snippet ensure that every enum value occures at least once? If not, what would be a better (more explicit) approach? My enum
contains more then 200 elements...
var fixture = new Fixture();
var fake = fixture.Create<CalculatedValue>();
var itemsChoiceTypeElements = Enum.GetNames(typeof(ItemsChoiceType)).Length;
fake.ItemsElementName = fixture.CreateMany<ItemsChoiceType>(itemsChoiceTypeElements).ToArray();