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)); }
public void ShouldReturnName() { //assign ISkill actualSkillBase = new AnimalHandling(); //act ITextObj name = actualSkillBase.Name(); //assert name.Should().Be(new TextObj("Animal Handling")); }
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); }
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)); }
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); }
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()); }