From 002897b50f27a50a54ea7047c7cc7b829c80f6a0 Mon Sep 17 00:00:00 2001 From: matiasdcl Date: Fri, 8 Nov 2024 15:00:18 -0300 Subject: [PATCH 1/2] asdadadsasd --- test/LibraryTests/FullHealthTests.cs | 31 ++++++++++++++++++++++++++++ test/LibraryTests/ReviveTest.cs | 24 +++++++++++++++++++++ test/LibraryTests/SuperPotionTest.cs | 24 +++++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 test/LibraryTests/FullHealthTests.cs create mode 100644 test/LibraryTests/ReviveTest.cs create mode 100644 test/LibraryTests/SuperPotionTest.cs diff --git a/test/LibraryTests/FullHealthTests.cs b/test/LibraryTests/FullHealthTests.cs new file mode 100644 index 0000000..e7ba079 --- /dev/null +++ b/test/LibraryTests/FullHealthTests.cs @@ -0,0 +1,31 @@ +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)); + } + + [Test] + public void TestPower0() + { + Attack attack = new Attack("impactrueno",Library.Type.Electric, 1, 0); + Assert.That(attack.Power.Equals(0)); + } + + +} \ No newline at end of file diff --git a/test/LibraryTests/ReviveTest.cs b/test/LibraryTests/ReviveTest.cs new file mode 100644 index 0000000..78f7ed5 --- /dev/null +++ b/test/LibraryTests/ReviveTest.cs @@ -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)); + } + + +} \ No newline at end of file diff --git a/test/LibraryTests/SuperPotionTest.cs b/test/LibraryTests/SuperPotionTest.cs new file mode 100644 index 0000000..94efde9 --- /dev/null +++ b/test/LibraryTests/SuperPotionTest.cs @@ -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)); + } + + +} \ No newline at end of file From 210180aff84cd43afd51456f7a57b154d90a2512 Mon Sep 17 00:00:00 2001 From: matiasdcl Date: Fri, 8 Nov 2024 15:01:27 -0300 Subject: [PATCH 2/2] asddasdas --- test/LibraryTests/FullHealthTests.cs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/test/LibraryTests/FullHealthTests.cs b/test/LibraryTests/FullHealthTests.cs index e7ba079..104ec69 100644 --- a/test/LibraryTests/FullHealthTests.cs +++ b/test/LibraryTests/FullHealthTests.cs @@ -20,12 +20,5 @@ public void FullHealthCorrectUse() Assert.That(charizard.CurrentState.Equals(null)); } - [Test] - public void TestPower0() - { - Attack attack = new Attack("impactrueno",Library.Type.Electric, 1, 0); - Assert.That(attack.Power.Equals(0)); - } - } \ No newline at end of file