public void GetParts_WithSimpleWords_ReturnsValue()
 {
     const string aString = "admin.kickPlayer soldier1 the-reason";
     var commandString = new DiceCommandString(aString);
     var parts = commandString.ToWords();
     var expectedParts = new IDiceWord[] {new DiceWord("admin.kickPlayer"), new DiceWord("soldier1"), new DiceWord("the-reason")};
     Assert.True(expectedParts.SequenceEqual(parts));
 }
 public void GetParts_WithQuotesAndMultipleSpace_ReturnsValue()
 {
     const string aString = "admin.kickPlayer soldier1 \"the unique reason\"";
     var expectedParts = new IDiceWord[] { new DiceWord("admin.kickPlayer"), new DiceWord("soldier1"), new DiceWord("the unique reason") };
     var commandString = new DiceCommandString(aString);
     var parts = commandString.ToWords();
     Assert.True(expectedParts.SequenceEqual(parts));
 }
Beispiel #3
0
 /// <summary>
 /// Indicates whether the current object is equal to another object of the same type.
 /// </summary>
 /// <returns>
 /// true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false.
 /// </returns>
 /// <param name="other">An object to compare with this object.</param>
 public bool Equals(IDiceWord other)
 {
     return Content == other.Content;
 }