public static Field GenerateField(IFixture fixture, FieldExactTypes type) { return(fixture.Build <Field>() .OmitAutoProperties() .Do(c => c.Init()) .With(f => f.Id) .With(f => f.Name) .With(f => f.IsClassifier, false) .With(f => f.ExactType, type) .Create()); }
/// <summary> /// Получить подмножество типов поля, конвертация в которые, разрешена из текущего типа поля /// </summary> public static IEnumerable <FieldExactTypes> GetAcceptableExactFieldTypes(FieldExactTypes fieldType) => fieldType == FieldExactTypes.Undefined ? Enum.GetValues(typeof(FieldExactTypes)).Cast <FieldExactTypes>() : FieldTypeConversionRules[fieldType];
public FieldTypeInfo(FieldExactTypes fti, int?relationId) { ExactType = fti; RelationId = relationId; }