package net.woodyfolsom.msproj;

import static org.junit.Assert.assertEquals;

import net.woodyfolsom.msproj.GameResult;

import org.junit.Test;

public class GameScoreTest {

	@Test
	public void testGetAggregateScoreZero() {
		GameResult gameScore = new GameResult(0,0,19,0, true);
		assertEquals(gameScore.getNormalizedZeroScore(), gameScore.getNormalizedScore());
	}
	
	@Test
	public void testGetAggregateScoreBlackWinsNoKomi() {
		GameResult gameScore = new GameResult(25,2,19,0, true);
		assertEquals(407, gameScore.getNormalizedScore());
	}
	
	@Test
	public void testGetAggregateScoreWhiteWinsWithKomi() {
		GameResult gameScore = new GameResult(10,12,19,6.5, true);
		assertEquals(357, gameScore.getNormalizedScore());
	}
}