Shivam Patel 6 anos atrás
pai
commit
b39e8ccebb
3 arquivos alterados com 96 adições e 23 exclusões
  1. 4
    0
      README.TXT
  2. 58
    0
      StudentTest.java
  3. 34
    23
      package.bluej

+ 4
- 0
README.TXT Ver arquivo

11
 
11
 
12
 This project may be used to study object creation and method calls from
12
 This project may be used to study object creation and method calls from
13
 within other object (non-interactive).
13
 within other object (non-interactive).
14
+
15
+abracadabra
16
+
17
+Shivam 

+ 58
- 0
StudentTest.java Ver arquivo

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 StudentTest.
10
+ *
11
+ * @author  (your name)
12
+ * @version (a version number or a date)
13
+ */
14
+public class StudentTest
15
+{
16
+    /**
17
+     * Default constructor for test class StudentTest
18
+     */
19
+    public StudentTest()
20
+    {
21
+    }
22
+
23
+    /**
24
+     * Sets up the test fixture.
25
+     *
26
+     * Called before every test case method.
27
+     */
28
+    @Before
29
+    public void setUp()
30
+    {
31
+    }
32
+
33
+    /**
34
+     * Tears down the test fixture.
35
+     *
36
+     * Called after every test case method.
37
+     */
38
+    @After
39
+    public void tearDown()
40
+    {
41
+    }
42
+
43
+    @Test
44
+    public void testFoo()
45
+    {
46
+        Student student1 = new Student("shiv", 1995, "345");
47
+        assertNotSame(123, student1.getStudentID());
48
+    }
49
+
50
+    @Test
51
+    public void testfoo1()
52
+    {
53
+        Student student1 = new Student("shiv", 1995, "345");
54
+        assertEquals("345", student1.getStudentID());
55
+    }
56
+}
57
+
58
+

+ 34
- 23
package.bluej Ver arquivo

5
 dependency2.from=Person
5
 dependency2.from=Person
6
 dependency2.to=Address
6
 dependency2.to=Address
7
 dependency2.type=UsesDependency
7
 dependency2.type=UsesDependency
8
+dependency3.from=StudentTest
9
+dependency3.to=Student
10
+dependency3.type=UsesDependency
8
 editor.fx.0.height=722
11
 editor.fx.0.height=722
9
 editor.fx.0.width=800
12
 editor.fx.0.width=800
10
-editor.fx.0.x=2941
13
+editor.fx.0.x=880
11
 editor.fx.0.y=59
14
 editor.fx.0.y=59
12
 objectbench.height=106
15
 objectbench.height=106
13
-objectbench.width=461
16
+objectbench.width=776
14
 package.divider.horizontal=0.6
17
 package.divider.horizontal=0.6
15
 package.divider.vertical=0.7915129151291513
18
 package.divider.vertical=0.7915129151291513
16
 package.editor.height=422
19
 package.editor.height=422
17
 package.editor.width=674
20
 package.editor.width=674
18
-package.editor.x=2110
19
-package.editor.y=77
21
+package.editor.x=100
22
+package.editor.y=100
20
 package.frame.height=600
23
 package.frame.height=600
21
 package.frame.width=800
24
 package.frame.width=800
22
-package.numDependencies=2
23
-package.numTargets=5
25
+package.numDependencies=3
26
+package.numTargets=6
24
 package.showExtends=true
27
 package.showExtends=true
25
 package.showUses=true
28
 package.showUses=true
26
 project.charset=UTF-8
29
 project.charset=UTF-8
30
 readme.x=10
33
 readme.x=10
31
 readme.y=10
34
 readme.y=10
32
 target1.height=50
35
 target1.height=50
33
-target1.name=Address
36
+target1.name=StudentTest
34
 target1.showInterface=false
37
 target1.showInterface=false
35
-target1.type=ClassTarget
38
+target1.type=UnitTestTargetJunit4
36
 target1.width=80
39
 target1.width=80
37
-target1.x=300
38
-target1.y=20
40
+target1.x=430
41
+target1.y=180
39
 target2.height=50
42
 target2.height=50
40
-target2.name=Staff
43
+target2.name=Address
41
 target2.showInterface=false
44
 target2.showInterface=false
42
 target2.type=ClassTarget
45
 target2.type=ClassTarget
43
 target2.width=80
46
 target2.width=80
44
-target2.x=130
45
-target2.y=220
47
+target2.x=300
48
+target2.y=20
46
 target3.height=50
49
 target3.height=50
47
-target3.name=Database
50
+target3.name=Staff
48
 target3.showInterface=false
51
 target3.showInterface=false
49
 target3.type=ClassTarget
52
 target3.type=ClassTarget
50
 target3.width=80
53
 target3.width=80
51
-target3.x=90
52
-target3.y=40
54
+target3.x=130
55
+target3.y=220
53
 target4.height=50
56
 target4.height=50
54
-target4.name=Student
57
+target4.name=Database
55
 target4.showInterface=false
58
 target4.showInterface=false
56
 target4.type=ClassTarget
59
 target4.type=ClassTarget
57
 target4.width=80
60
 target4.width=80
58
-target4.x=260
59
-target4.y=220
61
+target4.x=90
62
+target4.y=40
63
+target5.association=StudentTest
60
 target5.height=50
64
 target5.height=50
61
-target5.name=Person
65
+target5.name=Student
62
 target5.showInterface=false
66
 target5.showInterface=false
63
-target5.type=AbstractTarget
67
+target5.type=ClassTarget
64
 target5.width=80
68
 target5.width=80
65
-target5.x=190
66
-target5.y=110
69
+target5.x=400
70
+target5.y=210
71
+target6.height=50
72
+target6.name=Person
73
+target6.showInterface=false
74
+target6.type=AbstractTarget
75
+target6.width=80
76
+target6.x=190
77
+target6.y=110