private void checkKeywordCount(BPlusTree <BPlusString, BPlusListLong> tree, string keyword, int expectedCount) { int count = 0; foreach (BPlusString key in tree.GetAllKeywords()) { count++; } if (expectedCount != count) { MessageBox.Show("Keyword: " + keyword + "\nExpected: " + expectedCount + "\nGot: " + count); } }