public void DialogsTestTest05SaverJSON() { WorkflowUICommand obj = CreateObject(); SaverJson saver = new SaverJson(); saver.BuildDefaultJsonSettings(); saver.SerializeObject(@".\Data\DialogsTest05SaverJSON.EasyBpart", obj); Assert.IsTrue(File.Exists(@".\Data\DialogsTest05SaverJSON.EasyBpart")); WorkflowUICommand imprecord = saver.ImportPart <WorkflowUICommand>(@".\Data\DialogsTest05SaverJSON.EasyBpart"); Assert.AreEqual(imprecord.VersionId, obj.VersionId); Assert.AreEqual(imprecord.Name, obj.Name); Assert.AreEqual(imprecord.CheckStatus, obj.CheckStatus); Assert.AreEqual(imprecord.Description, obj.Description); Assert.AreEqual(imprecord.FormalParametersInternal.Count, obj.FormalParametersInternal.Count); Assert.AreEqual(imprecord.FormalParametersInternal.ElementAt(0).Name, obj.FormalParametersInternal.ElementAt(0).Name); Assert.AreEqual(imprecord.OptionsInternal.Count, obj.OptionsInternal.Count); Assert.AreEqual(imprecord.OptionsInternal.ElementAt(0), obj.OptionsInternal.ElementAt(0)); Assert.AreEqual(imprecord.ListsInternal.Count(), obj.ListsInternal.Count()); Assert.AreEqual(imprecord.ListsInternal.ElementAt(0).Name, obj.ListsInternal.ElementAt(0).Name); Assert.AreEqual(imprecord.FormatsInternal.Count(), obj.FormatsInternal.Count()); Assert.AreEqual(imprecord.FormatsInternal.ElementAt(0).Height, obj.FormatsInternal.ElementAt(0).Height); }
public void ViewGrid05SaverJSON() { ViewGrid obj = CreateEntity(); SaverJson saver = new SaverJson(); saver.BuildDefaultJsonSettings(); saver.SerializeObject(@".\Data\ViewGrid05SaverJSON.EasyBpart", obj); Assert.True(File.Exists(@".\Data\ViewGrid05SaverJSON.EasyBpart")); // ViewField impobj = saver.ImportPart<ViewField>(@".\Data\ViewField05SaverJSON.EasyBpart"); }
public void ViewField05SaverJSON() { ViewField obj = CreateEntity(); SaverJson saver = new SaverJson(); saver.BuildDefaultJsonSettings(); saver.SerializeObject(@".\Data\ViewField05SaverJSON.EasyBpart", obj); Assert.True(File.Exists(@".\Data\ViewField05SaverJSON.EasyBpart")); ViewField impobj = saver.ImportPart <ViewField>(@".\Data\ViewField05SaverJSON.EasyBpart"); Assert.Equal(impobj.Name, obj.Name); Assert.Equal(impobj.AllowAdvancedSearch, obj.AllowAdvancedSearch); Assert.Equal(impobj.AllowEdit, obj.AllowEdit); Assert.Equal(impobj.AllowMultiEdit, obj.AllowMultiEdit); Assert.Equal(impobj.AllowSearch, obj.AllowSearch); Assert.Equal(impobj.ColSpan, obj.ColSpan); Assert.Equal(impobj.IsVisible, obj.IsVisible); Assert.Equal(impobj.IsVisibleOnCreation, obj.IsVisibleOnCreation); Assert.Equal(impobj.RowSpan, obj.RowSpan); Assert.Equal(impobj.ShowInCollapsedGrid, obj.ShowInCollapsedGrid); Assert.Equal(impobj.ShowInExpandedGrid, obj.ShowInExpandedGrid); Assert.Equal(impobj.ImageNameFalse, obj.ImageNameFalse); Assert.Equal(impobj.ImageNameTrue, obj.ImageNameTrue); Assert.Equal(impobj.ImageFalseMode, obj.ImageFalseMode); Assert.Equal(impobj.IsRequired, obj.IsRequired); Assert.Equal(impobj.Sequence, obj.Sequence); Assert.Equal(impobj.SearchResource, obj.SearchResource); Assert.Equal(impobj.ViewAdvancedSearch, obj.ViewAdvancedSearch); Assert.Equal(impobj.Validator, obj.Validator); Assert.Equal(impobj.Title, obj.Title); Assert.Equal(impobj.Tooltip, obj.Tooltip); Assert.Equal(impobj.Property, obj.Property); Assert.NotNull(impobj.DrillDownLink); Assert.Equal(impobj.DrillDownLink.LinkParametersInternal.Count, obj.DrillDownLink.LinkParametersInternal.Count); Assert.Equal(impobj.DrillDownLink.TargetViewInternal, obj.DrillDownLink.TargetViewInternal); Assert.Equal(impobj.DrillDownLink.TargetViewProperty, obj.DrillDownLink.TargetViewProperty); Assert.NotNull(impobj.Lov); Assert.Equal(impobj.Lov.EntityInternal, obj.Lov.EntityInternal); Assert.Equal(impobj.Lov.DisplayProperty, obj.Lov.DisplayProperty); Assert.Equal(impobj.Lov.DependantProperty, obj.Lov.DependantProperty); Assert.Equal(impobj.Lov.DependantViewFieldLOV, obj.Lov.DependantViewFieldLOV); Assert.Equal(impobj.Lov.ValueProperty, obj.Lov.ValueProperty); Assert.Equal(impobj.Lov.SqlOrderBy, obj.Lov.SqlOrderBy); Assert.Equal(impobj.Lov.SqlWhere, obj.Lov.SqlWhere); Assert.NotNull(impobj.Lov.InLineLink); Assert.Equal(impobj.Lov.InLineLink.TargetViewProperty, obj.Lov.InLineLink.TargetViewProperty); Assert.Equal(impobj.Lov.InLineLink.TargetViewInternal, obj.Lov.InLineLink.TargetViewInternal); Assert.Equal(impobj.Lov.InLineLink.ExpressionCode, obj.Lov.InLineLink.ExpressionCode); }
public void Entity05SaverJSON() { Entity obj = CreateEntity(); SaverJson saver = new SaverJson(); saver.BuildDefaultJsonSettings(); saver.SerializeObject(@".\Data\EntityTest05SaverJSON.EasyBpart", obj); Assert.IsTrue(File.Exists(@".\Data\EntityTest05SaverJSON.EasyBpart")); Entity impobj = saver.ImportPart <Entity>(@".\Data\EntityTest05SaverJSON.EasyBpart"); Assert.AreEqual(impobj.Guid, obj.Guid); Assert.AreEqual(impobj.Name, obj.Name); Assert.AreEqual(impobj.CheckStatus, obj.CheckStatus); Assert.AreEqual(impobj.Description, obj.Description); Assert.AreEqual(impobj.IsDataWarehouse, obj.IsDataWarehouse); Assert.AreEqual(impobj.IsNew, obj.IsNew); Assert.AreEqual(impobj.SingularName, obj.SingularName); Assert.AreEqual(impobj.PluralName, obj.PluralName); Assert.AreEqual(impobj.PropertiesInternal.Count(), obj.PropertiesInternal.Count()); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(0).Name, obj.PropertiesInternal.ElementAt(0).Name); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(0).ColumnName, obj.PropertiesInternal.ElementAt(0).ColumnName); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(0).DataType.ToString(), obj.PropertiesInternal.ElementAt(0).DataType.ToString()); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(0).IsActiveProperty, obj.PropertiesInternal.ElementAt(0).IsActiveProperty); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(0).IsCustomField, obj.PropertiesInternal.ElementAt(0).IsCustomField); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(0).IsDataWarehouse, obj.PropertiesInternal.ElementAt(0).IsDataWarehouse); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(0).IsIndex, obj.PropertiesInternal.ElementAt(0).IsIndex); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(0).IsPrimaryKey, obj.PropertiesInternal.ElementAt(0).IsPrimaryKey); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(0).IsReadOnly, obj.PropertiesInternal.ElementAt(0).IsReadOnly); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(0).IsRequiered, obj.PropertiesInternal.ElementAt(0).IsRequiered); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(0).IsVisible, obj.PropertiesInternal.ElementAt(0).IsVisible); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(0).Lenght, obj.PropertiesInternal.ElementAt(0).Lenght); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(0).Precision, obj.PropertiesInternal.ElementAt(0).Precision); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(0).Title, obj.PropertiesInternal.ElementAt(0).Title); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(1).Name, obj.PropertiesInternal.ElementAt(1).Name); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(1).ColumnName, obj.PropertiesInternal.ElementAt(1).ColumnName); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(1).DataType.ToString(), obj.PropertiesInternal.ElementAt(1).DataType.ToString()); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(1).IsActiveProperty, obj.PropertiesInternal.ElementAt(1).IsActiveProperty); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(1).IsCustomField, obj.PropertiesInternal.ElementAt(1).IsCustomField); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(1).IsDataWarehouse, obj.PropertiesInternal.ElementAt(1).IsDataWarehouse); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(1).IsIndex, obj.PropertiesInternal.ElementAt(1).IsIndex); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(1).IsPrimaryKey, obj.PropertiesInternal.ElementAt(1).IsPrimaryKey); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(1).IsReadOnly, obj.PropertiesInternal.ElementAt(1).IsReadOnly); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(1).IsRequiered, obj.PropertiesInternal.ElementAt(1).IsRequiered); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(1).IsVisible, obj.PropertiesInternal.ElementAt(1).IsVisible); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(1).Lenght, obj.PropertiesInternal.ElementAt(1).Lenght); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(1).Precision, obj.PropertiesInternal.ElementAt(1).Precision); Assert.AreEqual(impobj.PropertiesInternal.ElementAt(1).Title, obj.PropertiesInternal.ElementAt(1).Title); }
public void RecordListTest05SaverJSON() { RecordList obj = CreateRecordList(); SaverJson saver = new SaverJson(); saver.BuildDefaultJsonSettings(); saver.SerializeObject(@".\Data\RecordListTest05SaverJSON.EasyBpart", obj); Assert.IsTrue(File.Exists(@".\Data\RecordListTest05SaverJSON.EasyBpart")); RecordList imprecord = saver.ImportPart <RecordList>(@".\Data\RecordListTest05SaverJSON.EasyBpart"); Assert.AreEqual(imprecord.Guid, obj.Guid); Assert.AreEqual(imprecord.Name, obj.Name); Assert.AreEqual(imprecord.CheckStatus, obj.CheckStatus); Assert.AreEqual(imprecord.Description, obj.Description); Assert.AreEqual(imprecord.Files, obj.Files); Assert.AreEqual(imprecord.Record, obj.Record); }
public void EventTestTest05SaverJSON() { Event obj = CreateObject(); SaverJson saver = new SaverJson(); saver.BuildDefaultJsonSettings(); saver.SerializeObject(@".\Data\EventTest05SaverJSON.EasyBpart", obj); Assert.True(File.Exists(@".\Data\EventTest05SaverJSON.EasyBpart")); Event impobj = saver.ImportPart <Event>(@".\Data\EventTest05SaverJSON.EasyBpart"); Assert.Equal(impobj.VersionId, obj.VersionId); Assert.Equal(impobj.Name, obj.Name); Assert.Equal(impobj.CheckStatus, obj.CheckStatus); Assert.Equal(impobj.Description, obj.Description); Assert.Equal(impobj.PropertiesInternal.Count, obj.PropertiesInternal.Count); Assert.Equal(impobj.PropertiesInternal.ElementAt(0).Name, obj.PropertiesInternal.ElementAt(0).Name); Assert.Equal(impobj.PropertiesInternal.ElementAt(1).DataType.ToString(), obj.PropertiesInternal.ElementAt(1).DataType.ToString()); }
public void WorkflowQueryCommandTest05SaverJSON() { WorkflowQueryCommand obj = CreateObject(); SaverJson saver = new SaverJson(); saver.BuildDefaultJsonSettings(); saver.SerializeObject(@".\Data\WorkflowQueryCommandTest05SaverJSON.EasyBpart", obj); Assert.True(File.Exists(@".\Data\WorkflowQueryCommandTest05SaverJSON.EasyBpart")); WorkflowQueryCommand imprecord = saver.ImportPart <WorkflowQueryCommand>(@".\Data\WorkflowQueryCommandTest05SaverJSON.EasyBpart"); Assert.Equal(imprecord.VersionId, obj.VersionId); Assert.Equal(imprecord.Name, obj.Name); Assert.Equal(imprecord.CheckStatus, obj.CheckStatus); Assert.Equal(imprecord.Description, obj.Description); Assert.Equal(imprecord.QueryType, obj.QueryType); Assert.Equal(imprecord.FormalParametersInternal.Count, obj.FormalParametersInternal.Count); Assert.Equal(imprecord.FormalParametersInternal.ElementAt(0).Name, obj.FormalParametersInternal.ElementAt(0).Name); }
public void FieldTypeTest07ImportJSON() { SaverJson saver = new SaverJson(); saver.BuildDefaultJsonSettings(); Assert.True(File.Exists(@".\Data\FieldType-ObjectDictionary-{6e8b5c8a-9bae-4da0-a83b-3fb4690cbd86}.EasyBpart")); FieldType fieldtype = saver.ImportPart <FieldType>(@".\Data\FieldType-ObjectDictionary-{6e8b5c8a-9bae-4da0-a83b-3fb4690cbd86}.EasyBpart"); Assert.Equal(fieldtype.Name, "ObjectDictionary"); Assert.Equal(fieldtype.CheckDigit, CheckDigit.Modulus43); Assert.Equal(fieldtype.CheckStatus, CheckStatus.Default); Assert.Equal(fieldtype.EditionLengthMode, EditionLengthMode.AllowShorter); Assert.Equal(fieldtype.FillMode, FillMode.None); Assert.Equal(fieldtype.Length, 0); Assert.Equal(fieldtype.Stereotype, Stereotype.ObjectDictionary); Assert.Equal(fieldtype.TruncateType, TruncateType.TruncateRight); Assert.Equal(fieldtype.EntityStereotypeInternal.ToString(), "4740ce9f-bdfe-4ce6-b485-05b93cb9de57"); }
public void RecordTest05SaverJSON() { EasyB.Model.Record obj = CreateRecord(); SaverJson saver = new SaverJson(); saver.BuildDefaultJsonSettings(); saver.SerializeObject(@".\Data\RecordTest05SaverJSON.EasyBpart", obj); Assert.True(File.Exists(@".\Data\RecordTest05SaverJSON.EasyBpart")); EasyB.Model.Record imprecord = saver.ImportPart <EasyB.Model.Record>(@".\Data\RecordTest05SaverJSON.EasyBpart"); Assert.Equal(imprecord.Guid, obj.Guid); Assert.Equal(imprecord.Name, obj.Name); Assert.Equal(imprecord.CheckStatus, obj.CheckStatus); Assert.Equal(imprecord.Description, obj.Description); Assert.Equal(imprecord.AutoUpdateLength, obj.AutoUpdateLength); Assert.Equal(imprecord.Separator, obj.Separator); Assert.Equal(imprecord.RecordType, obj.RecordType); Assert.Equal(imprecord.FieldRecordsInternal.Count(), obj.FieldRecordsInternal.Count()); }
public void FieldTypeTest05SaverJSON() { FieldType fieldtype = CreateFieldType(); SaverJson saver = new SaverJson(); saver.BuildDefaultJsonSettings(); saver.SerializeObject(@".\Data\FieldTypeTest05SaverJSON.EasyBpart", fieldtype); Assert.True(File.Exists(@".\Data\FieldTypeTest05SaverJSON.EasyBpart")); FieldType impfield = saver.ImportPart <FieldType>(@".\Data\FieldTypeTest05SaverJSON.EasyBpart"); Assert.Equal(fieldtype.Guid, impfield.Guid); Assert.Equal(fieldtype.Name, impfield.Name); Assert.Equal(fieldtype.CheckDigit, impfield.CheckDigit); Assert.Equal(fieldtype.CheckStatus, impfield.CheckStatus); Assert.Equal(fieldtype.Description, impfield.Description); Assert.Equal(fieldtype.EditionLengthMode, impfield.EditionLengthMode); Assert.Equal(fieldtype.FillMode, impfield.FillMode); Assert.Equal(fieldtype.InputMask, impfield.InputMask); Assert.Equal(fieldtype.Length, impfield.Length); Assert.Equal(fieldtype.Stereotype, impfield.Stereotype); Assert.Equal(fieldtype.TruncateType, impfield.TruncateType); Assert.Equal(fieldtype.EntityStereotypeInternal, impfield.EntityStereotypeInternal); }