public void ListFreq_Test() { var dict = new ListFreq(); var data = dict.GetCount(_words); var expected = new FreqResult(12, new[] { new KeyValuePair<string, int>("test", 3), new KeyValuePair<string, int>("test1", 2), new KeyValuePair<string, int>("hgf", 1), new KeyValuePair<string, int>("rty", 1), new KeyValuePair<string, int>("ghjkghjk", 1), new KeyValuePair<string, int>("qwerty", 1), new KeyValuePair<string, int>("mvbnmvbmn", 1), new KeyValuePair<string, int>("das", 1), new KeyValuePair<string, int>("asd", 1), new KeyValuePair<string, int>("aaaa", 1) }); Assert.AreEqual(true, FirstEqual(expected.TopResults, data.TopResults, 2)); Assert.AreEqual(expected.Count, data.Count); }
private void ListFreq_MouseDoubleClick(object sender, MouseEventArgs e) { rd.SetFrequency(ListFreq.GetItemText(ListFreq.SelectedItem).ToDouble()); }