public override Word DefineWord() { if (TargetWord.Equals(string.Empty)) { TargetWord = CharacterSymbol.DEFAULT_EXPRESSION; } return(new CharacterSymbol(TargetWord, Name, WordType)); }
public override Word DefineWord() { if (TargetWord.Equals(string.Empty)) { TargetWord = ModifiableStringLiteral.MODIFIABLE_IDENTIFIER; } return(new ModifiableStringLiteral(TargetWord, Name, WordType, Before)); }
public void IsCorrect_CheckReturnType_ReturnTrue() { // Arrange TargetWord word = new TargetWord(); // Act bool isCorrectLetter = word.IsCorrect('p'); // Assert Assert.IsTrue(isCorrectLetter); }
public void GenerateTargetWord_CheckReturnType_ReturnTrue() { // Arrange TargetWord word = new TargetWord(); List <string> expectedList = word.TargetWordsList; // Act string randomWordGenerated = word.GenerateTargetWord(); // Assert Assert.IsTrue(expectedList.Contains(randomWordGenerated)); }
public override bool Equals(object other) { Word w = (Word)other; return(TargetWord.Equals(w.TargetWord) && WordType.Equals(w.WordType)); }
public override int GetHashCode() { return(TargetWord.GetHashCode() + WordType.GetHashCode()); }
public virtual int CompareTo(string other) { return(TargetWord.CompareTo(other)); }
public virtual int CompareTo(Word other) { return(TargetWord.CompareTo(other.TargetWord) + WordType.CompareTo(other.WordType)); }
public virtual int CompareTo(Symbol other) { return(TargetWord.CompareTo(other.TargetWord)); }