Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }