Skip to content

Commit

Permalink
Test: Die Range Change
Browse files Browse the repository at this point in the history
  • Loading branch information
drbortel committed Sep 3, 2015
1 parent 4d55748 commit f35ba6d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/main/DieTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,16 @@ public void testDefaultDieValue() {
}

@Test
// Darren update Die Range
// New range 2-12 and not 1-6
public void testDieValueRange() {
try {
Die die = new Die();

for(int i = 0; i < 100; i++ ) {
int dieRoll = die.roll();

if(dieRoll < 1 || dieRoll > die.DEFAULT_NUMBER_OF_FACES ) {
if(dieRoll < 2 || dieRoll > (2 * die.DEFAULT_NUMBER_OF_FACES )) {
fail("Invalid Die Values");
}
}
Expand Down

0 comments on commit f35ba6d

Please sign in to comment.