public void GetWordModelsShould_ReturnEmptyCollectionOnEmptyInput() { var words = new string[0]; var expected = new WordModel[0]; var actual = FrequencyWordCloudAlgorithm.GetWordModels(words, 10, 50, 100); CollectionAssert.AreEqual(expected, actual); }
public bool Equals(WordModel other) { if (other == null) return false; return Size == other.Size && Word == other.Word; }
private static SizeF GetWordSize(Graphics graphics, WordModel wordModel, string fontName) { return graphics.MeasureString(wordModel.Word, new Font(fontName, wordModel.Size)); }