Commit 006271ad authored by Thomas DENIS's avatar Thomas DENIS
Browse files

Correction des test dans HandCreatureTest

parent 62263f09
package fr.univnantes.alma.server.game.item.player.hand;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.assertFalse;
import fr.univnantes.alma.server.game.item.jeton.JetonSymbol;
import java.util.ArrayList;
import java.util.List;
class HandCreatureTest {
/*
HandCreature hand = new HandCreature();
@Test
public void testInitializationJeton(){
Jeton j1 = new JetonArtemia();
Jeton j2 = new JetonCreature();
Jeton j3 = new JetonCible();
hand.initializationJeton();
assertTrue(hand.getJetons().contains(j1));
assertTrue(hand.getJetons().contains(j2));
assertTrue(hand.getJetons().contains(j3));
assertTrue(hand.getJetonSymbols().contains(JetonSymbol.ARTEMIA));
assertTrue(hand.getJetonSymbols().contains(JetonSymbol.CREATURE));
assertTrue(hand.getJetonSymbols().contains(JetonSymbol.CIBLE));
assertTrue(hand.getJetonSymbolsPlayed().isEmpty());
}
@Test
public void testPlayJeton(){
Jeton j1 = new JetonArtemia();
hand.getJetons().add(j1);
Jeton result = hand.playJeton(j1);
assertFalse(hand.getJetons().contains(j1));
JetonSymbol j1 = JetonSymbol.ARTEMIA;
boolean result = hand.playJeton(j1);
assertTrue(result);
assertFalse(hand.getJetonSymbols().contains(j1));
assertTrue(hand.getJetonSymbolsPlayed().contains(j1));
}
@Test
public void testPlayJetonSet(){
Jeton j1 = new JetonArtemia();
Set<Jeton> testjetons = new HashSet<>();
JetonSymbol j1 = JetonSymbol.ARTEMIA;
List<JetonSymbol> testjetons = new ArrayList<>();
testjetons.add(j1);
hand.getJetons().add(j1);
Set<Jeton> result = hand.playJeton(testjetons);
assertFalse(hand.getJetons().containsAll(testjetons));
hand.getJetonSymbols().add(j1);
boolean result = hand.playJeton(testjetons);
assertTrue(result);
assertFalse(hand.getJetonSymbols().containsAll(testjetons));
assertTrue(hand.getJetonSymbolsPlayed().containsAll(testjetons));
}
*/
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment