Shivam Patel hace 6 años
padre
commit
b39e8ccebb
Se han modificado 3 ficheros con 96 adiciones y 23 borrados
  1. 4
    0
      README.TXT
  2. 58
    0
      StudentTest.java
  3. 34
    23
      package.bluej

+ 4
- 0
README.TXT Ver fichero

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

+ 58
- 0
StudentTest.java Ver fichero

@@ -0,0 +1,58 @@
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 fichero

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