public void DCTokenCorrectlyExtractsInformation() { var token = new DifficultyClassToken(TokenContext.Create(@"{DC:wisdom+p}")); Assert.AreEqual(Ability.Wisdom, token.Ability); Assert.IsTrue(token.Proficient); Assert.IsTrue(new int[] { 0 }.SequenceEqual(token.Context.Groups)); }
public void DCTokenCorrectlyFormatted() { var token = new DifficultyClassToken(TokenContext.Create(@"{DC:wisdom+p}")); var actual = token.Format(azer); var expected = @"DC 10"; Assert.AreEqual(expected, actual); }
public void DCTokenCorrectlyRetokenizes() { var token = new DifficultyClassToken(TokenContext.Create(@"{DC:wisdom+p}")); token.Ability = Ability.Charisma; token.Proficient = true; var actual = token.TokenText; var expected = @"{dc:cha+p}"; Assert.AreEqual(expected, actual); }