-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
95 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using Library; | ||
using NUnit.Framework; | ||
namespace LibraryTests; | ||
|
||
|
||
public class AttackTest | ||
{ | ||
[SetUp] | ||
public void Setup() | ||
{ | ||
} | ||
|
||
[Test] | ||
public void TestAccuracy0() | ||
{ | ||
Attack attack = new Attack("impactrueno",Library.Type.Electric, 0, 100); | ||
Assert.That(attack.Accuracy.Equals(0)); | ||
} | ||
|
||
[Test] | ||
public void TestPower0() | ||
{ | ||
Attack attack = new Attack("impactrueno",Library.Type.Electric, 1, 0); | ||
Assert.That(attack.Power.Equals(0)); | ||
} | ||
|
||
[Test] | ||
public void TestNullName() | ||
{ | ||
Attack attack; | ||
Assert.That(new Attack("",Library.Type.Electric, 1, 30).Equals("El nombre ingresado no es válido")); | ||
} | ||
|
||
[Test] | ||
public void TestInvalidAccuracy() | ||
{ | ||
Attack attack; | ||
Assert.That(new Attack("impactrueno",Library.Type.Electric, 70000, 30).Equals("La precision ingresada no es válido")); | ||
} | ||
|
||
[Test] | ||
public void TestInvalidPower() | ||
{ | ||
Attack attack; | ||
Assert.That(new Attack("",Library.Type.Electric, 1, -80000).Equals("El poder ingresado no es válido")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using Library; | ||
using NUnit.Framework; | ||
|
||
namespace LibraryTests; | ||
|
||
[TestFixture] | ||
[TestOf(typeof(Game))] | ||
public class SpecialAttackTest | ||
{ | ||
[SetUp] | ||
public void Setup() | ||
{ | ||
} | ||
|
||
[Test] | ||
public void TestSpecialAttack() | ||
{ | ||
Charizard charizard = new Charizard(); | ||
SpecialAttack lanzallamas = new SpecialAttack("lanzallamas", Library.Type.Fire, 1, 40, Library.State.Burned); | ||
Gengar gengar = new Gengar(); | ||
DamageCalculator.CalculateDamage(gengar,lanzallamas); | ||
Assert.That(lanzallamas.SpecialEffect.Equals(gengar.CurrentState)); | ||
|
||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.