forked from fiuba/algo3_proyecto_base_tp2
-
Notifications
You must be signed in to change notification settings - Fork 3
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
21 changed files
with
630 additions
and
33 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
21 changes: 21 additions & 0 deletions
21
src/main/test/edu/fiuba/algo3/testsUnitarios/AfectantesTests/BacanalTests.java
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,21 @@ | ||
package edu.fiuba.algo3.testsUnitarios.AfectantesTests; | ||
|
||
import edu.fiuba.algo3.modelo.Dado; | ||
import edu.fiuba.algo3.modelo.Gladiador; | ||
import edu.fiuba.algo3.modelo.estados.Estado; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class BacanalTests { | ||
|
||
@Test | ||
public void test01SeModificaEnergia40CuandoElDadoDa5() { | ||
|
||
/* | ||
public Estado (Estado estado) { | ||
Dado dado = new Dado(6); | ||
int cantidadCopas = dado.tirar(); // Se puede vincular la accion de un boton al metodo tirar() de Dado? | ||
return (estado.reducirEnergia(ENERGIA_POR_COPA * cantidadCopas)); | ||
} | ||
*/ | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/test/edu/fiuba/algo3/testsUnitarios/AfectantesTests/ComidaTests.java
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,16 @@ | ||
package edu.fiuba.algo3.testsUnitarios.AfectantesTests; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class ComidaTests { | ||
|
||
@Test | ||
public void test01SeAumenta15DeEnergia() { | ||
|
||
/* | ||
public Estado modificarEnergia(Estado estado){ | ||
return estado.aumentarEnergia(AUMENTO_ENERGIA) ; | ||
} | ||
*/ | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/test/edu/fiuba/algo3/testsUnitarios/AfectantesTests/FieraTests.java
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,17 @@ | ||
package edu.fiuba.algo3.testsUnitarios.AfectantesTests; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class FieraTests { | ||
@Test | ||
public void test01FieraDisminuyeEnergiaDeGladiador() { | ||
|
||
/* | ||
/*public void afectar(Gladiador gladiador){ | ||
gladiador.recibirImpacto(this); | ||
*/ | ||
} | ||
|
||
} | ||
|
31 changes: 31 additions & 0 deletions
31
src/main/test/edu/fiuba/algo3/testsUnitarios/DadoTests.java
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,31 @@ | ||
package edu.fiuba.algo3.testsUnitarios; | ||
|
||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class DadoTests { | ||
|
||
@Test | ||
public void test01TirarElDado3Veces() { | ||
|
||
} | ||
|
||
@Test | ||
public void test02SeteaDadoCon2Caras() { | ||
|
||
} | ||
} | ||
|
||
|
||
/* private int ultimoNumeroTirado; | ||
private int caras = 6; | ||
public Dado(int carasDado){ | ||
this.caras = carasDado; | ||
} | ||
public int tirar() { | ||
Random random = new Random(); | ||
this.ultimoNumeroTirado = (random.nextInt(caras) + 1); | ||
return this.ultimoNumeroTirado; | ||
}*/ |
25 changes: 25 additions & 0 deletions
25
src/main/test/edu/fiuba/algo3/testsUnitarios/EquipamientoTests/ArmaduraTests.java
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 @@ | ||
package edu.fiuba.algo3.testsUnitarios.EquipamientoTests; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class ArmaduraTests { | ||
|
||
@Test | ||
public void test01SemejoraUnaArmadura() { | ||
|
||
/* | ||
return potenciador.equipamientoSiguiente(this); | ||
} | ||
*/ | ||
} | ||
|
||
@Test | ||
public void test02NoSeTieneEquipoCompletoConUnaArmadura() { | ||
/* | ||
public boolean equipoCompleto() { | ||
return false; | ||
} | ||
* */ | ||
} | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
src/main/test/edu/fiuba/algo3/testsUnitarios/EquipamientoTests/CascoTests.java
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,27 @@ | ||
package edu.fiuba.algo3.testsUnitarios.EquipamientoTests; | ||
|
||
import edu.fiuba.algo3.modelo.estados.Estado; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class CascoTests { | ||
|
||
@Test | ||
public void test01SemejoraUnCasco() { | ||
|
||
/* | ||
return potenciador.equipamientoSiguiente(this); | ||
} | ||
recibirAtaque | ||
*/ | ||
} | ||
|
||
@Test | ||
public void test02NoSeTieneEquipoCompletoConUnCasco() { | ||
/* | ||
public boolean equipoCompleto() { | ||
return false; | ||
} | ||
* */ | ||
} | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
src/main/test/edu/fiuba/algo3/testsUnitarios/EquipamientoTests/DesequipadoTests.java
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,24 @@ | ||
package edu.fiuba.algo3.testsUnitarios.EquipamientoTests; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class DesequipadoTests { | ||
|
||
@Test | ||
public void test01SemejoraSiendoDesequipado() { | ||
|
||
/* | ||
return potenciador.equipamientoSiguiente(this); | ||
} | ||
*/ | ||
} | ||
|
||
@Test | ||
public void test02NoSeTieneEquipoCompletoDesequipado() { | ||
/* | ||
public boolean equipoCompleto() { | ||
return false; | ||
} | ||
* */ | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/test/edu/fiuba/algo3/testsUnitarios/EquipamientoTests/EscudoYEspadaTests.java
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,24 @@ | ||
package edu.fiuba.algo3.testsUnitarios.EquipamientoTests; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class EscudoYEspadaTests { | ||
|
||
@Test | ||
public void test01SemejoraTeniendoEscudoYEspada() { | ||
|
||
/* | ||
return potenciador.equipamientoSiguiente(this); | ||
} | ||
*/ | ||
} | ||
|
||
@Test | ||
public void test02NoSeTieneEquipoCompletoConEscudoYEspada() { | ||
/* | ||
public boolean equipoCompleto() { | ||
return false; | ||
} | ||
* */ | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/main/test/edu/fiuba/algo3/testsUnitarios/EquipamientoTests/LlaveTests.java
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,23 @@ | ||
package edu.fiuba.algo3.testsUnitarios.EquipamientoTests; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class LlaveTests { | ||
@Test | ||
public void test01NoSemejoraTeniendoLlave() { | ||
|
||
/* | ||
return potenciador.equipamientoSiguiente(this); | ||
} | ||
*/ | ||
} | ||
|
||
@Test | ||
public void test02SeTieneEquipoCompletoConLlave() { | ||
/* | ||
public boolean equipoCompleto() { | ||
return false; | ||
} | ||
* */ | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/test/edu/fiuba/algo3/testsUnitarios/EstadosTests/CansadoTests.java
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,29 @@ | ||
package edu.fiuba.algo3.testsUnitarios.EstadosTests; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class CansadoTests { | ||
@Test | ||
public void test01AvanzaCansado(){ | ||
|
||
/* | ||
logger.warn("Estoy cansado Jefe :("); | ||
int energia = 5; | ||
return new Sano(energia); | ||
* */ | ||
} | ||
@Test | ||
public void test02aumentaEnergiaCansado() { | ||
|
||
/* | ||
public Estado aumentarEnergia(int energia){ | ||
return this; | ||
} | ||
public int getEnergia() { | ||
return 0; | ||
} | ||
*/ | ||
} | ||
|
||
} |
31 changes: 31 additions & 0 deletions
31
src/main/test/edu/fiuba/algo3/testsUnitarios/EstadosTests/LesionadoTests.java
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,31 @@ | ||
package edu.fiuba.algo3.testsUnitarios.EstadosTests; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class LesionadoTests { | ||
|
||
@Test | ||
public void test01AvanzaLesionado(){ | ||
|
||
/* | ||
* logger.warn("Estoy cansado Jefe :("); | ||
int energia = 5; | ||
return new Sano(energia); | ||
* */ | ||
} | ||
|
||
@Test | ||
public void test02aumentaEnergiaLesionado() { | ||
|
||
/* | ||
public Estado aumentarEnergia(int energia){ | ||
return this; | ||
} | ||
public int getEnergia() { | ||
return 0; | ||
} | ||
*/ | ||
} | ||
|
||
} |
40 changes: 40 additions & 0 deletions
40
src/main/test/edu/fiuba/algo3/testsUnitarios/EstadosTests/SanoTests.java
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,40 @@ | ||
package edu.fiuba.algo3.testsUnitarios.EstadosTests; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class SanoTests { | ||
|
||
@Test | ||
public void test01Avanza(){ | ||
|
||
/* | ||
public Estado avanzar(Celda futuraCelda, Gladiador gladiador, Logger logger) { | ||
logger.info("Movimiento exitoso."); | ||
return gladiador.mover(futuraCelda); | ||
}recibirAtaque | ||
* */ | ||
} | ||
@Test | ||
public void test02aumentaEnergia() { | ||
|
||
/* | ||
this.energiaActual += energia; | ||
return this; | ||
} | ||
*/ | ||
} | ||
|
||
@Test | ||
public void test03DisminuirEnergia() { | ||
/* | ||
* this.energiaActual -= energia; | ||
if (this.energiaActual <= SIN_ENERGIA) { | ||
return new Cansado(); | ||
} | ||
return this; | ||
* */ | ||
} | ||
} |
Oops, something went wrong.