Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Items tests #30

Merged
merged 2 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions test/LibraryTests/FullHealthTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using Library;
using NUnit.Framework;
namespace LibraryTests;


public class FullHealthTest
{
[SetUp]
public void Setup()
{
}

[Test]
public void FullHealthCorrectUse()
{
FullHealth fullHealthItem = new FullHealth();
Charizard charizard = new Charizard();
charizard.CurrentState = State.Asleep;
fullHealthItem.Use(charizard);
Assert.That(charizard.CurrentState.Equals(null));
}


}
24 changes: 24 additions & 0 deletions test/LibraryTests/ReviveTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using Library;
using NUnit.Framework;
namespace LibraryTests;


public class ReviveTest
{
[SetUp]
public void Setup()
{
}

[Test]
public void ReviveCorrectUse()
{
Revive ReviveItem = new Revive();
Charizard charizard = new Charizard();
charizard.TakeDamage(1000000);
ReviveItem.Use(charizard);
Assert.That(charizard.CurrentLife.Equals(180));
}


}
24 changes: 24 additions & 0 deletions test/LibraryTests/SuperPotionTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using Library;
using NUnit.Framework;
namespace LibraryTests;


public class SuperPotionTest
{
[SetUp]
public void Setup()
{
}

[Test]
public void SuperPotionCorrectUse()
{
SuperPotion SuperPotionItem = new SuperPotion();
Charizard charizard = new Charizard();
charizard.TakeDamage(60);
SuperPotionItem.Use(charizard);
Assert.That(charizard.CurrentLife.Equals(350));
}


}
Loading