public void LookupColumnAttribute_Defaults() { LookupColumnAttribute actual = new LookupColumnAttribute(); Assert.Equal(0, actual.Position); Assert.True(actual.Filterable); }
public void LookupColumnAttribute_SetsPosition() { Int32? actual = new LookupColumnAttribute(-5).Position; Int32? expected = -5; Assert.Equal(expected, actual); }
public void LookupColumnAttribute_Position() { LookupColumnAttribute attribute = new LookupColumnAttribute(-5); Assert.Equal(-5, attribute.Position); Assert.True(attribute.Filterable); }
protected override String GetColumnHeader(PropertyInfo property) { LookupColumnAttribute column = property.GetCustomAttribute <LookupColumnAttribute>(false); if (column != null && column.Relation != null) { return(GetColumnHeader(property.PropertyType.GetProperty(column.Relation))); } return(ResourceProvider.GetPropertyTitle(typeof(TView), property.Name) ?? ""); }
public void LookupColumnAttribute() { LookupColumnAttribute attribute = new LookupColumnAttribute(); Assert.True(attribute.Filterable); }