package poker.domain.classificacao

import poker.domain.Carta
import poker.domain.Valor._
import poker.domain.Naipe._
import org.testng.annotations._
import org.junit.Assert._
import poker.PokerHelperTest._

class UmParTest {
  
  @Test
  def menorParGanhaMaiorCartaMaisAlta() {
    assertTrue(menorPar() > maiorCartaMaisAlta())    
    assertTrue(maiorCartaMaisAlta() < menorPar())    
  }
  
  @Test
  def GanhaParMaisAlto() {
    assertTrue(c((2, PAUS), (3, PAUS), (4, OUROS), (AS, OUROS), (AS, ESPADAS)) >
               c((10, OUROS), (J, OUROS), (Q, PAUS), (K, PAUS), (K, COPAS)))
  }
  
  @Test
  def ParEmpataGanhaCartaMaisAlta() {
    assertTrue(c((2, PAUS), (3, PAUS), (K, OUROS), (AS, OUROS), (AS, ESPADAS)) >
               c((10, OUROS), (J, OUROS), (Q, PAUS), (AS, PAUS), (AS, COPAS)))
  }
  
  @Test
  def ParEmpataGanhaUltimaCartaMaisAlta() {
    assertTrue(c((3, PAUS), (Q, PAUS), (K, OUROS), (AS, OUROS), (AS, ESPADAS)) >
               c((2, OUROS), (Q, OUROS), (K, PAUS), (AS, PAUS), (AS, COPAS)))
  }
  
  @Test
  def Empata() {
		var comb = c((J, PAUS), (Q, PAUS), (K, OUROS), (AS, OUROS), (AS, ESPADAS))
    assertTrue(comb >= comb)
		assertTrue(comb <= comb)
  }
  
}
