public void Test6_7_ClearCompletedButton(int checkCount) { var checkList = new int[checkCount]; for (int i = 0; i < checkCount; i++) { var index = _rand.Next(TestItemsCount - 1); while (checkList.Contains(index)) { index = _rand.Next(TestItemsCount - 1); } _listItem.Check(index); checkList[i] = index; } _statusBar.ClickClearCompleted(); Assert.IsTrue(_listItem.GetItemsAll().Count == TestItemsCount - checkCount && NamesAreEqual(_testArray, checkList)); }