public void GetFieldsStructureTest() { FieldsStructureReaderService service = new FieldsStructureReaderService("V"); Fields fields = service.Get(); Assert.NotNull(fields); Assert.NotEmpty(fields.Items); foreach (FieldItem item in fields.Items) { this.Output.WriteLine( $"Name - {item.FieldName}, Type - {item.FieldType.GetType().ToString()}, Nullable Condition - {item.IsNullableCondition}"); } }
/// <summary> /// This function returns TRUE if all fields structure collection has been read successfully. /// </summary> /// <returns></returns> private bool GetFieldsStructureCollection() { try { FieldsStructureReaderService service = new FieldsStructureReaderService(this.Model); this.FieldsCollection = service.Get(); if (!this.FieldsCollection.Items.Any()) { throw new ArgumentNullException($"There ara no any fields found at all."); } } catch (Exception ex) { this.AddErrorMessage($"Fields structure initialization process: {ex.Message}"); } return(this.IsValid); }
protected Fields GetFieldsStructureCollection(string model) { FieldsStructureReaderService service = new FieldsStructureReaderService(model); return(service.Get()); }
private Fields GetFields() { FieldsStructureReaderService service = new FieldsStructureReaderService("V"); return(service.Get()); }