public void ContainsValue(int countKey) { var bidirHashtable = new BidirHashtable(); var result = true; for (int i = 0; i < countKey; i++) { bidirHashtable.Add(i, i + "foo"); result &= bidirHashtable.ContainsValue(i + "foo"); } Assert.True(result); }
public void Count(int countKey) { var bidirHashtable = new BidirHashtable(); for (int i = 0; i < countKey; i++) { bidirHashtable.Add(i, i); } var result = bidirHashtable.Count(); Assert.Equal(countKey, result); }
public void Set(int countKey) { var bidirHashtable = new BidirHashtable(); var result = true; for (int i = 0; i < countKey; i++) { bidirHashtable.Add(i, i); bidirHashtable.Set(i, i + "foo"); result &= bidirHashtable.Get(i) == (i + "foo"); } Assert.True(result); }
private static void InitMagicWsToWsId() { m_magicWsIdToWsName = new BidirHashtable(); m_magicWsIdToWsName[kwsAnal] = "analysis"; m_magicWsIdToWsName[kwsVern] = "vernacular"; m_magicWsIdToWsName[kwsVerns] = "all vernacular"; m_magicWsIdToWsName[kwsAnals] = "all analysis"; m_magicWsIdToWsName[kwsAnalVerns] = "analysis vernacular"; m_magicWsIdToWsName[kwsVernAnals] = "vernacular analysis"; m_magicWsIdToWsName[kwsFirstAnal] = "best analysis"; m_magicWsIdToWsName[kwsFirstVern] = "best vernacular"; m_magicWsIdToWsName[kwsFirstAnalOrVern] = "best analorvern"; m_magicWsIdToWsName[kwsFirstVernOrAnal] = "best vernoranal"; m_magicWsIdToWsName[kwsFirstPronunciation] = "best pronunciation"; m_magicWsIdToWsName[kwsPronunciations] = "all pronunciation"; m_magicWsIdToWsName[kwsReversalIndex] = "reversal"; m_magicWsIdToWsName[kwsAllReversalIndex] = "all reversal"; m_magicWsIdToWsName[kwsVernInParagraph] = "vern in para"; m_magicWsIdToWsName[kwsFirstVernOrNamed] = "best vernornamed"; }