| 12345678910111213141516171819202122232425262728 |
-
-
- import static org.junit.Assert.*;
- import org.junit.After;
- import org.junit.Before;
- import org.junit.Test;
-
- public class DiceTest
- {
- @Test
- public void tossTest1(){
- Dice die = new Dice();
- int min = 1;
- int max = 6;
- int actual = die.tossSum();
- assertTrue(min <= actual && actual <= max);
- }
-
- @Test
- public void tossTest2(){
- Dice die = new Dice(2);
- int min = 2;
- int max = 12;
- int actual = die.tossSum();
- assertTrue(min <= actual && actual <= max);
- }
- }
|