コード例 #1
0
        public void BuildDataIntoString()
        {
            var data       = new[] { "this", "is", "my", "data" };
            var dataString = helper.BuildEntry(data);

            Assert.That(dataString, Is.EqualTo("this@is@my@data"));
        }
コード例 #2
0
        public void FromData_ReturnsSelection_WithNoDamage()
        {
            var data    = attackHelper.BuildData("name", string.Empty, "effect", 4.2, "attack type", 9266, "time period", true, true, true, true, string.Empty, string.Empty);
            var rawData = attackHelper.BuildEntry(data);

            var selection = AttackSelection.From(rawData);

            Assert.That(selection.AttackType, Is.EqualTo("attack type"));
            Assert.That(selection.Damages, Is.Empty);
            Assert.That(selection.DamageEffect, Is.EqualTo("effect"));
            Assert.That(selection.DamageBonusMultiplier, Is.EqualTo(4.2));
            Assert.That(selection.FrequencyQuantity, Is.EqualTo(9266));
            Assert.That(selection.FrequencyTimePeriod, Is.EqualTo("time period"));
            Assert.That(selection.IsMelee, Is.True);
            Assert.That(selection.IsNatural, Is.True);
            Assert.That(selection.IsPrimary, Is.True);
            Assert.That(selection.IsSpecial, Is.True);
            Assert.That(selection.Name, Is.EqualTo("name"));
            Assert.That(selection.Save, Is.Empty);
            Assert.That(selection.SaveAbility, Is.Empty);
            Assert.That(selection.SaveDcBonus, Is.Zero);
        }