Initial commit.
This commit is contained in:
26
test/cs6601/p1/GameScoreTest.java
Normal file
26
test/cs6601/p1/GameScoreTest.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package cs6601.p1;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class GameScoreTest {
|
||||
|
||||
@Test
|
||||
public void testGetAggregateScoreZero() {
|
||||
GameScore gameScore = new GameScore(0,0,0);
|
||||
assertEquals(GameScore.NORMALIZED_ZERO_SCORE, gameScore.getAggregateScore());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetAggregateScoreBlackWinsNoKomi() {
|
||||
GameScore gameScore = new GameScore(25,2,0);
|
||||
assertEquals(425, gameScore.getAggregateScore());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetAggregateScoreWhiteWinsWithKomi() {
|
||||
GameScore gameScore = new GameScore(10,12,6.5);
|
||||
assertEquals(362, gameScore.getAggregateScore());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user