/**
* Tests the implementation of the Chen formula calculator.
*/
@Test
public void chenFormula() {
Card card1 = null;
Card card2 = null;
card1 = new Card(Card.ACE, Card.SPADES);
card2 = new Card(Card.ACE, Card.HEARTS);
Assert.assertEquals(20.0, PokerUtils.getChenScore(new Card[] {card1, card2}), DELTA);
card1 = new Card(Card.ACE, Card.SPADES);
card2 = new Card(Card.KING, Card.SPADES);
Assert.assertEquals(12.0, PokerUtils.getChenScore(new Card[] {card1, card2}), DELTA);
card1 = new Card(Card.KING, Card.SPADES);
card2 = new Card(Card.KING, Card.HEARTS);
Assert.assertEquals(16.0, PokerUtils.getChenScore(new Card[] {card1, card2}), DELTA);
card1 = new Card(Card.TEN, Card.CLUBS);
card2 = new Card(Card.TEN, Card.DIAMONDS);
Assert.assertEquals(10.0, PokerUtils.getChenScore(new Card[] {card1, card2}), DELTA);
card1 = new Card(Card.FIVE, Card.CLUBS);
card2 = new Card(Card.SEVEN, Card.CLUBS);
Assert.assertEquals(6.0, PokerUtils.getChenScore(new Card[] {card1, card2}), DELTA);
card1 = new Card(Card.DEUCE, Card.CLUBS);
card2 = new Card(Card.SEVEN, Card.DIAMONDS);
Assert.assertEquals(0.0, PokerUtils.getChenScore(new Card[] {card1, card2}), DELTA);
}