瀏覽代碼

Randall Done

Randall Gibson Jr 6 年之前
父節點
當前提交
eed6724de8
共有 3 個檔案被更改,包括 89 行新增23 行删除
  1. 27
    0
      AccountTest.java
  2. 27
    0
      SquaresTest.java
  3. 35
    23
      package.bluej

+ 27
- 0
AccountTest.java 查看文件

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 AccountTest.
10
+ *
11
+ * @author  (your name)
12
+ * @version (a version number or a date)
13
+ */
14
+public class AccountTest
15
+{
16
+    @Test
17
+    
18
+    public void AccountsNumber(){
19
+        Account act = new Account();
20
+        int x=2;
21
+        int actual=x;
22
+        int expected =2;
23
+        
24
+        assertEquals(expected,actual);
25
+
26
+    }
27
+}

+ 27
- 0
SquaresTest.java 查看文件

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 SquaresTest.
10
+ *
11
+ * @author  (your name)
12
+ * @version (a version number or a date)
13
+ */
14
+public class SquaresTest
15
+{
16
+    @Test
17
+    public void square(){
18
+        Squares sq = new Squares();
19
+        
20
+        int expected= 2;
21
+        int actual= 2;
22
+        
23
+        assertEquals(expected,actual);
24
+        
25
+        
26
+}
27
+}

+ 35
- 23
package.bluej 查看文件

1
 #BlueJ package file
1
 #BlueJ package file
2
-dependency1.from=Account
3
-dependency1.to=AccountException
2
+dependency1.from=Calendar1
3
+dependency1.to=CalendarGraphic
4
 dependency1.type=UsesDependency
4
 dependency1.type=UsesDependency
5
-dependency2.from=DepositAccount
6
-dependency2.to=AccountException
5
+dependency2.from=Calendar1
6
+dependency2.to=DateException
7
 dependency2.type=UsesDependency
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
8
 editor.fx.0.height=722
20
 editor.fx.0.height=722
9
 editor.fx.0.width=800
21
 editor.fx.0.width=800
10
 editor.fx.0.x=114
22
 editor.fx.0.x=114
11
-editor.fx.0.y=175
23
+editor.fx.0.y=26
12
 objectbench.height=101
24
 objectbench.height=101
13
 objectbench.width=461
25
 objectbench.width=461
14
 package.divider.horizontal=0.6
26
 package.divider.horizontal=0.6
15
 package.divider.vertical=0.8007380073800738
27
 package.divider.vertical=0.8007380073800738
16
 package.editor.height=427
28
 package.editor.height=427
17
 package.editor.width=674
29
 package.editor.width=674
18
-package.editor.x=1006
30
+package.editor.x=480
19
 package.editor.y=133
31
 package.editor.y=133
20
 package.frame.height=600
32
 package.frame.height=600
21
 package.frame.width=800
33
 package.frame.width=800
22
-package.numDependencies=2
34
+package.numDependencies=6
23
 package.numTargets=13
35
 package.numTargets=13
24
 package.showExtends=true
36
 package.showExtends=true
25
 package.showUses=true
37
 package.showUses=true
37
 target1.x=450
49
 target1.x=450
38
 target1.y=190
50
 target1.y=190
39
 target10.height=50
51
 target10.height=50
40
-target10.name=Scrabble
52
+target10.name=DepositAccount
41
 target10.showInterface=false
53
 target10.showInterface=false
42
 target10.type=ClassTarget
54
 target10.type=ClassTarget
43
-target10.width=80
44
-target10.x=10
45
-target10.y=250
55
+target10.width=120
56
+target10.x=170
57
+target10.y=120
46
 target11.height=50
58
 target11.height=50
47
 target11.name=TriangleTwo
59
 target11.name=TriangleTwo
48
 target11.showInterface=false
60
 target11.showInterface=false
65
 target13.x=470
77
 target13.x=470
66
 target13.y=340
78
 target13.y=340
67
 target2.height=50
79
 target2.height=50
68
-target2.name=Account
80
+target2.name=Calendar1
69
 target2.showInterface=false
81
 target2.showInterface=false
70
 target2.type=ClassTarget
82
 target2.type=ClassTarget
71
-target2.width=80
72
-target2.x=50
73
-target2.y=110
83
+target2.width=90
84
+target2.x=330
85
+target2.y=220
74
 target3.height=50
86
 target3.height=50
75
-target3.name=Calendar1
87
+target3.name=Account
76
 target3.showInterface=false
88
 target3.showInterface=false
77
 target3.type=ClassTarget
89
 target3.type=ClassTarget
78
-target3.width=90
79
-target3.x=330
80
-target3.y=220
90
+target3.width=80
91
+target3.x=50
92
+target3.y=110
81
 target4.height=50
93
 target4.height=50
82
 target4.name=Squares
94
 target4.name=Squares
83
 target4.showInterface=false
95
 target4.showInterface=false
114
 target8.x=350
126
 target8.x=350
115
 target8.y=290
127
 target8.y=290
116
 target9.height=50
128
 target9.height=50
117
-target9.name=DepositAccount
129
+target9.name=Scrabble
118
 target9.showInterface=false
130
 target9.showInterface=false
119
 target9.type=ClassTarget
131
 target9.type=ClassTarget
120
-target9.width=120
121
-target9.x=170
122
-target9.y=120
132
+target9.width=80
133
+target9.x=10
134
+target9.y=250