1 package org
.eclipse
.linuxtools
.tmf
.core
.tests
.ctfadaptor
;
3 import static org
.junit
.Assert
.assertEquals
;
4 import static org
.junit
.Assert
.assertNotNull
;
6 import org
.eclipse
.linuxtools
.tmf
.core
.ctfadaptor
.CtfLocation
;
7 import org
.eclipse
.linuxtools
.tmf
.core
.event
.ITmfTimestamp
;
8 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfTimestamp
;
9 import org
.junit
.After
;
10 import org
.junit
.Before
;
11 import org
.junit
.Test
;
14 * The class <code>CtfLocationTest</code> contains tests for the class <code>{@link CtfLocation}</code>.
16 * @generatedBy CodePro at 03/05/12 2:29 PM
18 * @version $Revision: 1.0 $
20 public class CtfLocationTest
{
22 * Run the CtfLocation(Long) constructor test.
24 * @generatedBy CodePro at 03/05/12 2:29 PM
26 @SuppressWarnings("static-method")
28 public void testCtfLocation_1() {
29 Long location
= Long
.valueOf(1);
31 CtfLocation result
= new CtfLocation(location
);
33 // add additional test code here
34 assertNotNull(result
);
35 assertEquals(Long
.valueOf(1), result
.getLocation());
39 * Run the CtfLocation(ITmfTimestamp) constructor test.
41 * @generatedBy CodePro at 03/05/12 2:29 PM
43 @SuppressWarnings("static-method")
45 public void testCtfLocation_2() {
46 ITmfTimestamp timestamp
= new TmfTimestamp();
48 CtfLocation result
= new CtfLocation(timestamp
);
50 // add additional test code here
51 assertNotNull(result
);
52 assertEquals(new Long(0L), result
.getLocation());
56 * Run the CtfLocation clone() method test.
58 * @generatedBy CodePro at 03/05/12 2:29 PM
60 @SuppressWarnings("static-method")
62 public void testClone_1() {
63 CtfLocation fixture
= new CtfLocation(Long
.valueOf(1));
64 fixture
.setLocation(Long
.valueOf(1));
66 CtfLocation result
= fixture
.clone();
68 // add additional test code here
69 assertNotNull(result
);
70 assertEquals(Long
.valueOf(1), result
.getLocation());
74 * Run the Long getLocation() method test.
76 * @generatedBy CodePro at 03/05/12 2:29 PM
78 @SuppressWarnings("static-method")
80 public void testGetLocation_1() {
81 CtfLocation fixture
= new CtfLocation(Long
.valueOf(1));
82 fixture
.setLocation(Long
.valueOf(1));
84 Long result
= fixture
.getLocation();
86 // add additional test code here
87 assertNotNull(result
);
88 assertEquals("1", result
.toString()); //$NON-NLS-1$
89 assertEquals((byte) 1, result
.byteValue());
90 assertEquals((short) 1, result
.shortValue());
91 assertEquals(1, result
.intValue());
92 assertEquals(1L, result
.longValue());
93 assertEquals(1.0f
, result
.floatValue(), 1.0f
);
94 assertEquals(1.0, result
.doubleValue(), 1.0);
98 * Run the void setLocation(Long) method test.
100 * @generatedBy CodePro at 03/05/12 2:29 PM
102 @SuppressWarnings("static-method")
104 public void testSetLocation_1() {
105 CtfLocation fixture
= new CtfLocation(Long
.valueOf(1));
106 fixture
.setLocation(Long
.valueOf(1));
107 Long location
= Long
.valueOf(1);
109 fixture
.setLocation(location
);
111 // add additional test code here
114 @SuppressWarnings("static-method")
116 public void testToString1(){
117 CtfLocation fixture
= new CtfLocation(new Long(1337L));
118 assertEquals("CtfLocation: 1337",fixture
.toString()); //$NON-NLS-1$
121 @SuppressWarnings("static-method")
123 public void testToString2(){
124 CtfLocation fixture
= new CtfLocation(new Long(-1L));
125 assertEquals("CtfLocation: INVALID",fixture
.toString()); //$NON-NLS-1$
129 * Perform pre-test initialization.
131 * @generatedBy CodePro at 03/05/12 2:29 PM
134 public void setUp() {
135 // add additional set up code here
139 * Perform post-test clean-up.
141 * @generatedBy CodePro at 03/05/12 2:29 PM
144 public void tearDown() {
145 // Add additional tear down code here
151 * @param args the command line arguments
153 * @generatedBy CodePro at 03/05/12 2:29 PM
155 public static void main(String
[] args
) {
156 new org
.junit
.runner
.JUnitCore().run(CtfLocationTest
.class);
This page took 0.033889 seconds and 6 git commands to generate.