Ejemplo n.º 1
0
        public void Default()
        {
            // Arrange
            Func <byte> baseCasterLevel = () => 1;
            CasterLevel cl = new CasterLevel(baseCasterLevel);

            // Assert
            Assert.IsInstanceOf <UntypedBonusTracker>(cl.UntypedBonuses);
        }
Ejemplo n.º 2
0
        public void GetTotal_Aggregates()
        {
            // Arrange
            Func <byte> baseCasterLevel = () => 1;
            CasterLevel cl = new CasterLevel(baseCasterLevel);

            cl.UntypedBonuses.Add(() => 2);

            // Act
            byte total = cl.GetTotal();

            // Assert
            Assert.AreEqual(3, total,
                            "3 = (1 base) + (2 untyped)");
        }
Ejemplo n.º 3
0
        public string CasterLevelName()
        {
            string Start = "(CL ";

            switch (CasterLevel)
            {
            case 1:
                return(Start + "1st)");

            case 2:
                return(Start + "2nd)");

            case 3:
                return(Start + "3rd)");

            default:
                return(Start + CasterLevel.ToString() + "th)");
            }
        }