Skip to content

Commit

Permalink
Fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nightblade9 committed Dec 18, 2024
1 parent a9ff735 commit 222f1b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions source/TextBlade.Core.Tests/Characters/CharacterTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using NSubstitute;
using NUnit.Framework;
using TextBlade.Core.Characters;
using TextBlade.Core.IO;

namespace TextBlade.Core.Tests.Characters;

Expand All @@ -14,7 +16,7 @@ public void Defend_SetsIsDefendingToTrue()
var c = new Character("Muhammad", 100, 10, 3);

// Act
c.Defend();
c.Defend(Substitute.For<IConsole>());

// Assert
Assert.That(c.IsDefending, Is.True);
Expand All @@ -25,7 +27,7 @@ public void OnRoundComplete_SetsIsDefendingToFalse()
{
// Arrange
var c = new Character("Muhammad", 100, 10, 3);
c.Defend();
c.Defend(Substitute.For<IConsole>());

// Act
c.OnRoundComplete();
Expand Down
4 changes: 3 additions & 1 deletion source/TextBlade.Core.Tests/Characters/MonsterTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using NSubstitute;
using NUnit.Framework;
using TextBlade.Core.Characters;
using TextBlade.Core.IO;

namespace TextBlade.Core.Tests.Characters;

Expand Down Expand Up @@ -62,7 +64,7 @@ public void Attack_DamagesByLessThanStrengthMinusTargetToughness_IfTargetIsBlock
// Arrange
var monster = new Monster("Green Slime", 100, 10, 5);
var target = new Character("Asad", 100, 100, toughness: 3);
target.Defend();
target.Defend(Substitute.For<IConsole>());

var expectedDamage = monster.Strength - target.Toughness;

Expand Down

0 comments on commit 222f1b9

Please sign in to comment.