public void addKeyword(Keyword keyword) { if(String.IsNullOrEmpty(keyword.getWord())){ return; } for(int i = 0; i < this.words.Count; i++){ if (this.words[i].getWord() == keyword.getWord()) { return; } } if (this.words == null) { this.words = new List<Keyword>() { keyword }; return; } this.words.Add(keyword); }
public void KeywordCreateTest() { Keyword k = new Keyword("word"); Assert.IsTrue(k.getWord().Equals("word")); }