blob: cebb8e65064a79e55c2b945869b8ef687b8a2496 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
package ca.mokhan.test;
import Q2.*;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
public class RockPaperScissorsLizardSpockTest extends TestCase {
private RockPaperScissorsLizardSpock subject;
public RockPaperScissorsLizardSpockTest(String testName) {
super(testName);
this.subject = new RockPaperScissorsLizardSpock();
}
public static Test suite() {
return new TestSuite(RockPaperScissorsLizardSpockTest.class);
}
public void testTruthy() {
assertEquals(true, true);
assertTrue(true);
}
public void testRandomMinimum() {
assertTrue(subject.random() > 0);
}
public void testRandomMaximum() {
assertTrue(subject.random() < 5);
}
public void testRandom_ShouldNotEqualPrevious() {
int first = subject.random();
int second = subject.random();
assertTrue(first != second);
}
}
|