public void TestFieldDefaultLabelFromClassDef() { ClassDef classDef = CreateTestClassDef(""); IUIGridColumn uiGridColumn = new UIGridColumn(null, "TestProperty", typeof(DataGridViewTextBoxColumn), false, 100, PropAlignment.left, null); #pragma warning disable 612,618 Assert.AreEqual("Tested Property", uiGridColumn.GetHeading(classDef)); #pragma warning restore 612,618 }
public void TestFieldDefaultLabelFromRelatedClassDef() { ClassDef.ClassDefs.Clear(); ClassDef classDef = CreateTestClassDef(""); ClassDef classDef2 = CreateTestClassDef("2"); ClassDef.ClassDefs.Add(classDef2); RelKeyDef relKeyDef = new RelKeyDef(); RelPropDef relPropDef = new RelPropDef(classDef.PropDefcol["TestProperty"], "TestProperty2"); relKeyDef.Add(relPropDef); SingleRelationshipDef def = new SingleRelationshipDef("TestRel", classDef2.AssemblyName, classDef2.ClassName, relKeyDef, false, DeleteParentAction.Prevent); classDef.RelationshipDefCol.Add(def); UIGridColumn uiGridColumn; uiGridColumn = new UIGridColumn(null, "TestRel.TestProperty2", typeof(DataGridViewTextBoxColumn), false, 100, PropAlignment.left, null); #pragma warning disable 612,618 Assert.AreEqual("Tested Property2", uiGridColumn.GetHeading(classDef)); #pragma warning restore 612,618 }
public void TestFieldDefaultLabel() { IUIGridColumn uiGridColumn = new UIGridColumn(null, "TestProperty", typeof(DataGridViewTextBoxColumn), false, 100, PropAlignment.left, null); Assert.AreEqual("Test Property", uiGridColumn.GetHeading()); }