public void ColumnFactory_BasicExtensibility() { CustomColumnSupport.RegisterCustomColumns(); // Registering the same name twice throws an exception Verify.Exception <ArribaException>(() => CustomColumnSupport.RegisterCustomColumns()); // Column factory can call custom column creators Assert.AreEqual("UntypedColumn<ComparableColor>;ColorColumn", WriteCompleteType(ColumnFactory.Build(new ColumnDetails("Unused", "color", null), 0))); }
public void Table_CustomColumnBasic() { CustomColumnSupport.RegisterCustomColumns(); ITable_CustomColumn( () => new ColorTable("Sample", 75000), (tbl) => { tbl.AddColumn(new ColumnDetails("Color", "color", null)); (tbl as ColorTable).BindColorColumns("Priority", "Color"); }); }
public void Partition_CustomColumnBasic() { CustomColumnSupport.RegisterCustomColumns(); ITable_CustomColumn( () => new Partition(PartitionMask.All), (tbl) => { tbl.AddColumn(new ColumnDetails("Color", "color", null)); IUntypedColumn bugIDColumn = (tbl as Partition).Columns["Priority"]; IUntypedColumn colorColumn = (tbl as Partition).Columns["Color"]; (colorColumn.InnerColumn as ColorColumn).LookupColumn = (IColumn <short>)bugIDColumn.InnerColumn; }); }