|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
|
2
|
+
|
|
|
3
|
+import static org.junit.Assert.*;
|
|
|
4
|
+import org.junit.After;
|
|
|
5
|
+import org.junit.Before;
|
|
|
6
|
+import org.junit.Test;
|
|
|
7
|
+
|
|
|
8
|
+/**
|
|
|
9
|
+ * The test class ScrabbleTest.
|
|
|
10
|
+ *
|
|
|
11
|
+ * @author (your name)
|
|
|
12
|
+ * @version (a version number or a date)
|
|
|
13
|
+ */
|
|
|
14
|
+public class ScrabbleTest
|
|
|
15
|
+{
|
|
|
16
|
+
|
|
|
17
|
+ @Before
|
|
|
18
|
+ public void setUp()
|
|
|
19
|
+ {
|
|
|
20
|
+ Scrabble scrabble = new Scrabble();
|
|
|
21
|
+ }
|
|
|
22
|
+
|
|
|
23
|
+ @Test
|
|
|
24
|
+ public void testScore(){
|
|
|
25
|
+ int expected = 8;
|
|
|
26
|
+ int actual = Scrabble.score("Tyler");
|
|
|
27
|
+
|
|
|
28
|
+ assertEquals(expected, actual);
|
|
|
29
|
+ }
|
|
|
30
|
+
|
|
|
31
|
+ @Test
|
|
|
32
|
+ public void testScore2(){
|
|
|
33
|
+ int expected = 10;
|
|
|
34
|
+ int actual = Scrabble.score("book");
|
|
|
35
|
+
|
|
|
36
|
+ assertEquals(expected, actual);
|
|
|
37
|
+ }
|
|
|
38
|
+
|
|
|
39
|
+}
|