Clear() public method

Clear all items.
Enhance JohnT: add the version that takes an ObjectCollection.
public Clear ( ) : void
return void
コード例 #1
0
ファイル: FwListBoxTests.cs プロジェクト: bbriggs/FieldWorks
		public void Clear_CollectionWithSingleElement_CollectionShouldBeEmpty()
		{
			using (var listBox = new FwListBox())
			{
				using (var collection = new FwListBox.ObjectCollection(listBox))
				{
					ITsString testString = TsStringHelper.MakeTSS("test", m_hvoEnglishWs);
					collection.Add(testString);

					// The Test
					collection.Clear();

					Assert.AreEqual(0, collection.Count);
					Assert.IsFalse(collection.Contains(testString));
				}
			}
		}