Beispiel #1
0
 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);
 }
Beispiel #2
0
 public void KeywordEmptyWordTest()
 {
     Keyword k = new Keyword("");
     Assert.IsNull(k);
 }
Beispiel #3
0
 public void KeywordCreateTest()
 {
     Keyword k = new Keyword("word");
     Assert.IsTrue(k.getWord().Equals("word"));
 }