#22 scrabble @rjsmall90

오픈
rjsmall90 rjsmall90/ZCW-YeOldeCode:master 에서 master 로 1 commits 를 머지하려 합니다
2개의 변경된 파일92개의 추가작업 그리고 35개의 파일을 삭제
  1. 34
    0
      ScrabbleTest.java
  2. 58
    35
      package.bluej

+ 34
- 0
ScrabbleTest.java 파일 보기

@@ -0,0 +1,34 @@
1
+import org.junit.Assert;
2
+import org.junit.After;
3
+import org.junit.Before;
4
+import org.junit.Test;
5
+
6
+
7
+/**
8
+ * The test class ScrabbleTest.
9
+ *
10
+ * @author  (your name)
11
+ * @version (a version number or a date)
12
+ */
13
+public class ScrabbleTest
14
+{
15
+    /**
16
+     * Default constructor for test class ScrabbleTest
17
+     */
18
+    public ScrabbleTest()
19
+    {
20
+    }
21
+    
22
+    @Test
23
+    public void testScore(){
24
+    Scrabble scrabble = new Scrabble();
25
+    String word = "pontificate"; 
26
+    int expectedScore = 18; 
27
+    
28
+    int actualScore = scrabble.score(word); 
29
+    
30
+    
31
+    Assert.assertEquals(expectedScore, actualScore);
32
+    
33
+    }
34
+}

+ 58
- 35
package.bluej 파일 보기

@@ -1,26 +1,41 @@
1 1
 #BlueJ package file
2
-dependency1.from=Account
3
-dependency1.to=AccountException
2
+dependency1.from=Calendar1
3
+dependency1.to=CalendarGraphic
4 4
 dependency1.type=UsesDependency
5
-dependency2.from=DepositAccount
6
-dependency2.to=AccountException
5
+dependency2.from=Calendar1
6
+dependency2.to=DateException
7 7
 dependency2.type=UsesDependency
8
+dependency3.from=Account
9
+dependency3.to=AccountException
10
+dependency3.type=UsesDependency
11
+dependency4.from=Calendar
12
+dependency4.to=DateException
13
+dependency4.type=UsesDependency
14
+dependency5.from=Date
15
+dependency5.to=DateException
16
+dependency5.type=UsesDependency
17
+dependency6.from=DepositAccount
18
+dependency6.to=AccountException
19
+dependency6.type=UsesDependency
20
+dependency7.from=ScrabbleTest
21
+dependency7.to=Scrabble
22
+dependency7.type=UsesDependency
8 23
 editor.fx.0.height=722
9 24
 editor.fx.0.width=800
10
-editor.fx.0.x=114
11
-editor.fx.0.y=175
25
+editor.fx.0.x=113
26
+editor.fx.0.y=26
12 27
 objectbench.height=101
13 28
 objectbench.width=461
14 29
 package.divider.horizontal=0.6
15 30
 package.divider.vertical=0.8007380073800738
16 31
 package.editor.height=427
17 32
 package.editor.width=674
18
-package.editor.x=1006
19
-package.editor.y=133
33
+package.editor.x=480
34
+package.editor.y=132
20 35
 package.frame.height=600
21 36
 package.frame.width=800
22
-package.numDependencies=2
23
-package.numTargets=13
37
+package.numDependencies=7
38
+package.numTargets=14
24 39
 package.showExtends=true
25 40
 package.showUses=true
26 41
 project.charset=UTF-8
@@ -36,6 +51,7 @@ target1.type=ClassTarget
36 51
 target1.width=130
37 52
 target1.x=450
38 53
 target1.y=190
54
+target10.association=ScrabbleTest
39 55
 target10.height=50
40 56
 target10.name=Scrabble
41 57
 target10.showInterface=false
@@ -44,40 +60,47 @@ target10.width=80
44 60
 target10.x=10
45 61
 target10.y=250
46 62
 target11.height=50
47
-target11.name=TriangleTwo
63
+target11.name=DepositAccount
48 64
 target11.showInterface=false
49 65
 target11.type=ClassTarget
50
-target11.width=100
51
-target11.x=120
52
-target11.y=310
66
+target11.width=120
67
+target11.x=170
68
+target11.y=120
53 69
 target12.height=50
54
-target12.name=AccountException
70
+target12.name=TriangleTwo
55 71
 target12.showInterface=false
56 72
 target12.type=ClassTarget
57
-target12.width=140
58
-target12.x=190
59
-target12.y=30
73
+target12.width=100
74
+target12.x=120
75
+target12.y=310
60 76
 target13.height=50
61
-target13.name=DateException
77
+target13.name=AccountException
62 78
 target13.showInterface=false
63 79
 target13.type=ClassTarget
64
-target13.width=120
65
-target13.x=470
66
-target13.y=340
80
+target13.width=140
81
+target13.x=190
82
+target13.y=30
83
+target14.height=50
84
+target14.name=DateException
85
+target14.showInterface=false
86
+target14.type=ClassTarget
87
+target14.width=120
88
+target14.x=470
89
+target14.y=340
67 90
 target2.height=50
68
-target2.name=Account
91
+target2.name=Calendar1
69 92
 target2.showInterface=false
70 93
 target2.type=ClassTarget
71
-target2.width=80
72
-target2.x=50
73
-target2.y=110
94
+target2.width=90
95
+target2.x=330
96
+target2.y=220
74 97
 target3.height=50
75
-target3.name=Calendar1
98
+target3.name=Account
76 99
 target3.showInterface=false
77 100
 target3.type=ClassTarget
78
-target3.width=90
79
-target3.x=330
80
-target3.y=220
101
+target3.width=80
102
+target3.x=50
103
+target3.y=110
81 104
 target4.height=50
82 105
 target4.name=Squares
83 106
 target4.showInterface=false
@@ -114,9 +137,9 @@ target8.width=80
114 137
 target8.x=350
115 138
 target8.y=290
116 139
 target9.height=50
117
-target9.name=DepositAccount
140
+target9.name=ScrabbleTest
118 141
 target9.showInterface=false
119
-target9.type=ClassTarget
120
-target9.width=120
121
-target9.x=170
122
-target9.y=120
142
+target9.type=UnitTestTargetJunit4
143
+target9.width=80
144
+target9.x=40
145
+target9.y=220