SIL.FieldWorks.FwCoreDlgs.DummyWritingSystemPropertiesDialog.VerifyListBox C# (CSharp) Method

VerifyListBox() private method

Verifies the writing system order.
private VerifyListBox ( string wsnames ) : void
wsnames string The wsnames.
return void
		internal void VerifyListBox(string[] wsnames)
		{
			Assert.AreEqual(wsnames.Length, WsList.Items.Count,
				"Number of writing systems in list is incorrect.");

			for (int i = 0; i < wsnames.Length; i++)
			{
				Assert.AreEqual(wsnames[i], WsList.Items[i].ToString());
			}
		}

Usage Example

Ejemplo n.º 1
0
 public void WsListContent()
 {
     // Setup dialog to show Kalaba (xkal) related wss.
     m_dlg.ShowDialog(m_wsKalaba);
     m_dlg.VerifyListBox(new[] { "Kalaba", "Kalaba (International Phonetic Alphabet)" });
     m_dlg.VerifyRelatedWritingSystem("kal");
     m_dlg.VerifyLoadedForListBoxSelection("Kalaba");
     // Select Kalaba (IPA) and verify dialog is setup for that one.
     m_dlg.WsList.SelectedItem = m_dlg.WsList.Items.Cast <CoreWritingSystemDefinition>().Single(ws => ws.DisplayLabel == "Kalaba (International Phonetic Alphabet)");
     m_dlg.VerifyLoadedForListBoxSelection("Kalaba (International Phonetic Alphabet)");
 }