public void Build_EmptyAndNullAreDifferent_CorrectDisplay() { // Design Dummy Column DataColumn col = new DataColumn("DummyColumn"); col.ExtendedProperties.Add("NBi::Role", ColumnRole.Key); col.ExtendedProperties.Add("NBi::Type", ColumnType.Text); // Design dummy table DataTable table = new DataTable(); table.Columns.Add(col); var row = table.NewRow(); row[0] = string.Empty; row.SetColumnError(0, "(null)"); ICellFormatter cf = LineFormatter.Build(row, 0); // This must not throw an exception when the header is bigger that requested size var text = cf.GetText(20); Assert.That(text, Is.StringContaining("(empty)")); Assert.That(text, Is.StringContaining("<>")); Assert.That(text, Is.StringContaining("(null)")); }