#28 J-N000

오픈
J-N000 J-N000/ZCW-YeOldeCode:master 에서 master 로 1 commits 를 머지하려 합니다
2개의 변경된 파일87개의 추가작업 그리고 33개의 파일을 삭제
  1. 31
    0
      AccountTest.java
  2. 56
    33
      package.bluej

+ 31
- 0
AccountTest.java 파일 보기

@@ -0,0 +1,31 @@
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
+public class AccountTest
10
+{
11
+    @Test
12
+    public void accountCreationTest() {
13
+        Account actual = new Account(100);
14
+        assertNotNull(actual);
15
+    }
16
+    @Test
17
+    public void depositTest() {
18
+        Account test = new Account(50);
19
+        test.deposit(50);
20
+        int expected = 100;
21
+        int actual = test.balance();
22
+        assertEquals(expected, actual);     
23
+    }
24
+    @Test
25
+    public void nullaryConstructorTest() {
26
+        Account test = new Account();
27
+        int expected = 0;
28
+        int actual = test.balance();
29
+        assertEquals(expected, actual);
30
+    }
31
+}

+ 56
- 33
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
-editor.fx.0.height=722
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=AccountTest
21
+dependency7.to=Account
22
+dependency7.type=UsesDependency
23
+editor.fx.0.height=714
9 24
 editor.fx.0.width=800
10
-editor.fx.0.x=114
11
-editor.fx.0.y=175
25
+editor.fx.0.x=240
26
+editor.fx.0.y=23
12 27
 objectbench.height=101
13
-objectbench.width=461
28
+objectbench.width=776
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=173
34
+package.editor.y=106
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
@@ -37,12 +52,12 @@ target1.width=130
37 52
 target1.x=450
38 53
 target1.y=190
39 54
 target10.height=50
40
-target10.name=Scrabble
55
+target10.name=DepositAccount
41 56
 target10.showInterface=false
42 57
 target10.type=ClassTarget
43
-target10.width=80
44
-target10.x=10
45
-target10.y=250
58
+target10.width=120
59
+target10.x=170
60
+target10.y=120
46 61
 target11.height=50
47 62
 target11.name=TriangleTwo
48 63
 target11.showInterface=false
@@ -58,26 +73,34 @@ target12.width=140
58 73
 target12.x=190
59 74
 target12.y=30
60 75
 target13.height=50
61
-target13.name=DateException
76
+target13.name=AccountTest
62 77
 target13.showInterface=false
63
-target13.type=ClassTarget
64
-target13.width=120
65
-target13.x=470
66
-target13.y=340
78
+target13.type=UnitTestTargetJunit4
79
+target13.width=80
80
+target13.x=80
81
+target13.y=80
82
+target14.height=50
83
+target14.name=DateException
84
+target14.showInterface=false
85
+target14.type=ClassTarget
86
+target14.width=120
87
+target14.x=470
88
+target14.y=340
67 89
 target2.height=50
68
-target2.name=Account
90
+target2.name=Calendar1
69 91
 target2.showInterface=false
70 92
 target2.type=ClassTarget
71
-target2.width=80
72
-target2.x=50
73
-target2.y=110
93
+target2.width=90
94
+target2.x=330
95
+target2.y=220
96
+target3.association=AccountTest
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=Scrabble
118 141
 target9.showInterface=false
119 142
 target9.type=ClassTarget
120
-target9.width=120
121
-target9.x=170
122
-target9.y=120
143
+target9.width=80
144
+target9.x=10
145
+target9.y=250