public void AttackTokenCorrectlyExtractsInformation() { var token = new AttackToken(TokenContext.Create(@"{attack:str+p}")); Assert.AreEqual(Ability.Strength, token.Ability); Assert.IsTrue(token.Proficient); Assert.IsTrue(new int[] { 0 }.SequenceEqual(token.Context.Groups)); }
public void AttackTokenCorrectlyFormatted() { var token = new AttackToken(TokenContext.Create(@"{attack:str+p}")); var actual = token.Format(azer); var expected = @"+5"; Assert.AreEqual(expected, actual); }
public void AttackTokenCorrectlyRetokenizes() { var token = new AttackToken(TokenContext.Create(@"{attack:str+p}")); token.Ability = Ability.Wisdom; token.Proficient = false; var actual = token.TokenText; var expected = @"{attack:wis}"; Assert.AreEqual(expected, actual); }