public async Task <IActionResult> Edit(int id, [Bind("Deceptionid,Deceptionprof")] Deception deception)
        {
            if (id != deception.Deceptionid)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(deception);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!DeceptionExists(deception.Deceptionid))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(deception));
        }
        public void ShouldNotEquate()
        {
            //assign
            ISkill expectedSkillBase = new Acrobatics();
            ISkill actualSkillBase   = new Deception();

            //assert
            actualSkillBase.Should().NotBe(expectedSkillBase);
        }
        public void ShouldReturnName()
        {
            //assign
            ISkill actualSkillBase = new Deception();
            //act
            ITextObj name = actualSkillBase.Name();

            //assert
            name.Should().Be(new TextObj("Deception"));
        }
Exemple #4
0
        public void Bonus_DeceptionSpecified_ShouldWork()
        {
            SetupCharacter();

            Skills deception = new Deception(true, true);

            Assert.AreEqual(-5, deception.Bonus);
            Assert.IsTrue(deception.Proficiency);
            Assert.IsTrue(deception.Expertise);
        }
        public async Task <IActionResult> Create([Bind("Deceptionid,Deceptionprof")] Deception deception)
        {
            if (ModelState.IsValid)
            {
                _context.Add(deception);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(deception));
        }
        public void ShouldReturnWisdomAsBaseAttribute()
        {
            //arrange
            ISkill skill = new Deception();
            ICharacterAttribute charismaAttribute = new CharismaAttribute();
            //act
            ICharacterAttribute actualAttribute = skill.BaseAttribute();

            //assert
            actualAttribute.Should().Be(charismaAttribute);
        }
        public void ShouldReturnActiveSkillBonus()
        {
            //arrange
            ISkill         expectedSkillBase = new Deception(new CharismaAttribute(new AttributeScore(14)), true);
            AttributeScore score             = new AttributeScore(4);
            //act
            IAttributeScore actualScore = expectedSkillBase.SkillBonus();

            //assert
            actualScore.Should().Be(score);
        }
        public void ShouldReturnBonusOfBaseAttribute()
        {
            //arrange
            CharismaAttribute charismaAttribute = new CharismaAttribute(new AttributeScore(14));
            ISkill            deception         = new Deception(charismaAttribute, false);
            IAttributeScore   expectedScore     = new AttributeScore(2);
            //act
            IAttributeScore actualScore = deception.SkillBonus();

            //assert
            actualScore.Should().Be(expectedScore);
        }
Exemple #9
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());
 }