public async Task <IActionResult> Edit(int id, [Bind("AnimalHandlingId,Animalhandprof")] AnimalHandling animalHandling)
        {
            if (id != animalHandling.AnimalHandlingId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(animalHandling);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AnimalHandlingExists(animalHandling.AnimalHandlingId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(animalHandling));
        }
示例#2
0
        public void ShouldReturnName()
        {
            //assign
            ISkill actualSkillBase = new AnimalHandling();
            //act
            ITextObj name = actualSkillBase.Name();

            //assert
            name.Should().Be(new TextObj("Animal Handling"));
        }
示例#3
0
        public void Bonus_AnimalHandlingSpecified_ShouldWork()
        {
            SetupCharacter();

            Skills animalHandling = new AnimalHandling(true, true);

            Assert.AreEqual(-5, animalHandling.Bonus);
            Assert.IsTrue(animalHandling.Proficiency);
            Assert.IsTrue(animalHandling.Expertise);
        }
示例#4
0
        public void ShouldReturnBaseAttribute()
        {
            //arrange
            ISkill skill = new AnimalHandling();
            ICharacterAttribute wisdomAttribute = new WisdomAttribute();
            //act
            ICharacterAttribute actualAttribute = skill.BaseAttribute();

            //assert
            actualAttribute.Should().Be(wisdomAttribute);
        }
        public async Task <IActionResult> Create([Bind("AnimalHandlingId,Animalhandprof")] AnimalHandling animalHandling)
        {
            if (ModelState.IsValid)
            {
                _context.Add(animalHandling);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(animalHandling));
        }
示例#6
0
        public void ShouldReturnBonusOfBaseAttribute()
        {
            //arrange
            WisdomAttribute wisdomAttribute = new WisdomAttribute(new AttributeScore(14));
            ISkill          animalHandling  = new AnimalHandling(wisdomAttribute);
            IAttributeScore expectedScore   = new AttributeScore(2);
            //act
            IAttributeScore actualScore = animalHandling.SkillBonus();

            //assert
            actualScore.Should().Be(expectedScore);
        }
示例#7
0
 public override string ToString()
 {
     return(Acrobatics.ToString() + ' ' +
            AnimalHandling.ToString() + ' ' +
            Arcana.ToString() + ' ' +
            Athletics.ToString() + ' ' +
            Deception.ToString() + ' ' +
            History.ToString() + ' ' +
            Insight.ToString() + ' ' +
            Intimidation.ToString() + ' ' +
            Investigation.ToString() + ' ' +
            Medicine.ToString() + ' ' +
            Nature.ToString() + ' ' +
            Perception.ToString() + ' ' +
            Performance.ToString() + ' ' +
            Persusion.ToString() + ' ' +
            Religion.ToString() + ' ' +
            SleightOfHand.ToString() + ' ' +
            Stealth.ToString() + ' ' +
            Survival.ToString());
 }