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());
 }
Exemplo n.º 2
0
 /// <summary>
 /// Получить подмножество типов поля, конвертация в которые, разрешена из текущего типа поля
 /// </summary>
 public static IEnumerable <FieldExactTypes> GetAcceptableExactFieldTypes(FieldExactTypes fieldType) => fieldType == FieldExactTypes.Undefined
     ? Enum.GetValues(typeof(FieldExactTypes)).Cast <FieldExactTypes>()
     : FieldTypeConversionRules[fieldType];
Exemplo n.º 3
0
 public FieldTypeInfo(FieldExactTypes fti, int?relationId)
 {
     ExactType  = fti;
     RelationId = relationId;
 }