public void ColumnHeaderCollection_Insert_String_Success(string text, string expectedText) { using var listView = new ListView(); var collection = new ListView.ColumnHeaderCollection(listView); collection.Insert(0, text); using ColumnHeader header = Assert.Single(collection.Cast <ColumnHeader>()); Assert.Equal(expectedText, header.Text); Assert.Equal(listView, header.ListView); }
public void ColumnHeaderCollection_Add_String_Success(string text, string expectedText) { var listView = new ListView(); var collection = new ListView.ColumnHeaderCollection(listView); collection.Add(text); ColumnHeader header = Assert.Single(collection.Cast <ColumnHeader>()); Assert.Same(expectedText, header.Text); Assert.Equal(listView, header.ListView); }
public void ColumnHeaderCollection_Insert_String_Success(string text) { var listView = new ListView(); var collection = new ListView.ColumnHeaderCollection(listView); collection.Insert(0, text); ColumnHeader header = Assert.Single(collection.Cast <ColumnHeader>()); Assert.Equal(text ?? string.Empty, header.Text); Assert.Equal(listView, header.ListView); }
public void ColumnHeaderCollection_Insert_String_Int_HorizontalAlignment_Success(string text, int width, HorizontalAlignment textAlign, string expectedText) { using var listView = new ListView(); var collection = new ListView.ColumnHeaderCollection(listView); collection.Insert(0, text, width, textAlign); using ColumnHeader header = Assert.Single(collection.Cast <ColumnHeader>()); Assert.Equal(expectedText, header.Text); Assert.Equal(width, header.Width); Assert.Equal(textAlign, header.TextAlign); Assert.Equal(listView, header.ListView); }
public void ColumnHeaderCollection_Insert_String_Int_Success(string text, int width, string expectedText) { var listView = new ListView(); var collection = new ListView.ColumnHeaderCollection(listView); collection.Insert(0, text, width); ColumnHeader header = Assert.Single(collection.Cast <ColumnHeader>()); Assert.Same(expectedText, header.Text); Assert.Equal(width, header.Width); Assert.Equal(listView, header.ListView); }
public void ColumnHeaderCollection_Add_String_Int_Success(string text, int width) { var listView = new ListView(); var collection = new ListView.ColumnHeaderCollection(listView); collection.Add(text, width); ColumnHeader header = Assert.Single(collection.Cast <ColumnHeader>()); Assert.Equal(text ?? string.Empty, header.Text); Assert.Equal(width, header.Width); Assert.Equal(listView, header.ListView); }
public void ColumnHeaderCollection_Add_String_String_Success(string name, string text, string expectedName, string expectedText) { using var listView = new ListView(); var collection = new ListView.ColumnHeaderCollection(listView) { { name, text } }; using ColumnHeader header = Assert.Single(collection.Cast <ColumnHeader>()); Assert.Equal(expectedName, header.Name); Assert.Equal(expectedText, header.Text); Assert.Equal(listView, header.ListView); }
public void ColumnHeaderCollection_Add_String_Int_Success(string text, int width, string expectedText) { using var listView = new ListView(); var collection = new ListView.ColumnHeaderCollection(listView) { { text, width } }; using ColumnHeader header = Assert.Single(collection.Cast <ColumnHeader>()); Assert.Equal(expectedText, header.Text); Assert.Equal(width, header.Width); Assert.Equal(listView, header.ListView); }
public void ColumnHeaderCollection_Insert_String_String_Int_HorizontalAlignment_String_Success(string name, string text, int width, HorizontalAlignment textAlign, string imageKey, string expectedName, string expectedText, string expectedImageKey) { var listView = new ListView(); var collection = new ListView.ColumnHeaderCollection(listView); collection.Insert(0, name, text, width, textAlign, imageKey); ColumnHeader header = Assert.Single(collection.Cast <ColumnHeader>()); Assert.Equal(expectedName, header.Name); Assert.Equal(expectedText, header.Text); Assert.Equal(width, header.Width); Assert.Equal(textAlign, header.TextAlign); Assert.Equal(expectedImageKey, header.ImageKey); Assert.Equal(listView, header.ListView); }
public void ColumnHeaderCollection_Insert_String_String_Int_HorizontalAlignment_Int_Success(string name, string text, int width, HorizontalAlignment textAlign, int imageIndex) { var listView = new ListView(); var collection = new ListView.ColumnHeaderCollection(listView); collection.Insert(0, name, text, width, textAlign, imageIndex); ColumnHeader header = Assert.Single(collection.Cast <ColumnHeader>()); Assert.Equal(name ?? string.Empty, header.Name); Assert.Equal(text ?? string.Empty, header.Text); Assert.Equal(width, header.Width); Assert.Equal(textAlign, header.TextAlign); Assert.Equal(imageIndex, header.ImageIndex); Assert.Equal(listView, header.ListView); }
public void ColumnHeaderCollection_Add_String_String_Int_HorizontalAlignment_Int_Success(string name, string text, int width, HorizontalAlignment textAlign, int imageIndex, string expectedName, string expectedText) { using var listView = new ListView(); var collection = new ListView.ColumnHeaderCollection(listView) { { name, text, width, textAlign, imageIndex } }; using ColumnHeader header = Assert.Single(collection.Cast <ColumnHeader>()); Assert.Equal(expectedName, header.Name); Assert.Equal(expectedText, header.Text); Assert.Equal(width, header.Width); Assert.Equal(textAlign, header.TextAlign); Assert.Equal(imageIndex, header.ImageIndex); Assert.Equal(listView, header.ListView); }
public System.Collections.Generic.IEnumerator <ColumnHeaderEx> GetEnumerator() => list.Cast <ColumnHeaderEx>().GetEnumerator();