Commit | Line | Data |
---|---|---|
81c8e6f7 MK |
1 | package org.eclipse.linuxtools.tmf.core.tests.ctfadaptor; |
2 | ||
3 | import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfLocation; | |
4 | import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp; | |
5 | import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp; | |
6 | import org.junit.*; | |
7 | import static org.junit.Assert.*; | |
8 | ||
9 | /** | |
10 | * The class <code>CtfLocationTest</code> contains tests for the class <code>{@link CtfLocation}</code>. | |
11 | * | |
12 | * @generatedBy CodePro at 03/05/12 2:29 PM | |
13 | * @author ematkho | |
14 | * @version $Revision: 1.0 $ | |
15 | */ | |
16 | public class CtfLocationTest { | |
17 | /** | |
18 | * Run the CtfLocation(Long) constructor test. | |
19 | * | |
20 | * @throws Exception | |
21 | * | |
22 | * @generatedBy CodePro at 03/05/12 2:29 PM | |
23 | */ | |
24 | @Test | |
25 | public void testCtfLocation_1() | |
26 | throws Exception { | |
27 | Long location = new Long(1L); | |
28 | ||
29 | CtfLocation result = new CtfLocation(location); | |
30 | ||
31 | // add additional test code here | |
32 | assertNotNull(result); | |
33 | assertEquals(new Long(1L), result.getLocation()); | |
34 | } | |
35 | ||
36 | /** | |
37 | * Run the CtfLocation(ITmfTimestamp) constructor test. | |
38 | * | |
39 | * @throws Exception | |
40 | * | |
41 | * @generatedBy CodePro at 03/05/12 2:29 PM | |
42 | */ | |
43 | @Test | |
44 | public void testCtfLocation_2() | |
45 | throws Exception { | |
46 | ITmfTimestamp timestamp = new TmfTimestamp(); | |
47 | ||
48 | CtfLocation result = new CtfLocation(timestamp); | |
49 | ||
50 | // add additional test code here | |
51 | assertNotNull(result); | |
52 | assertEquals(new Long(0L), result.getLocation()); | |
53 | } | |
54 | ||
55 | /** | |
56 | * Run the CtfLocation clone() method test. | |
57 | * | |
58 | * @throws Exception | |
59 | * | |
60 | * @generatedBy CodePro at 03/05/12 2:29 PM | |
61 | */ | |
62 | @Test | |
63 | public void testClone_1() | |
64 | throws Exception { | |
65 | CtfLocation fixture = new CtfLocation(new Long(1L)); | |
66 | fixture.setLocation(new Long(1L)); | |
67 | ||
68 | CtfLocation result = fixture.clone(); | |
69 | ||
70 | // add additional test code here | |
71 | assertNotNull(result); | |
72 | assertEquals(new Long(1L), result.getLocation()); | |
73 | } | |
74 | ||
75 | /** | |
76 | * Run the Long getLocation() method test. | |
77 | * | |
78 | * @throws Exception | |
79 | * | |
80 | * @generatedBy CodePro at 03/05/12 2:29 PM | |
81 | */ | |
82 | @Test | |
83 | public void testGetLocation_1() | |
84 | throws Exception { | |
85 | CtfLocation fixture = new CtfLocation(new Long(1L)); | |
86 | fixture.setLocation(new Long(1L)); | |
87 | ||
88 | Long result = fixture.getLocation(); | |
89 | ||
90 | // add additional test code here | |
91 | assertNotNull(result); | |
92 | assertEquals("1", result.toString()); | |
93 | assertEquals((byte) 1, result.byteValue()); | |
94 | assertEquals((short) 1, result.shortValue()); | |
95 | assertEquals(1, result.intValue()); | |
96 | assertEquals(1L, result.longValue()); | |
97 | assertEquals(1.0f, result.floatValue(), 1.0f); | |
98 | assertEquals(1.0, result.doubleValue(), 1.0); | |
99 | } | |
100 | ||
101 | /** | |
102 | * Run the void setLocation(Long) method test. | |
103 | * | |
104 | * @throws Exception | |
105 | * | |
106 | * @generatedBy CodePro at 03/05/12 2:29 PM | |
107 | */ | |
108 | @Test | |
109 | public void testSetLocation_1() | |
110 | throws Exception { | |
111 | CtfLocation fixture = new CtfLocation(new Long(1L)); | |
112 | fixture.setLocation(new Long(1L)); | |
113 | Long location = new Long(1L); | |
114 | ||
115 | fixture.setLocation(location); | |
116 | ||
117 | // add additional test code here | |
118 | } | |
119 | ||
120 | /** | |
121 | * Perform pre-test initialization. | |
122 | * | |
123 | * @throws Exception | |
124 | * if the initialization fails for some reason | |
125 | * | |
126 | * @generatedBy CodePro at 03/05/12 2:29 PM | |
127 | */ | |
128 | @Before | |
129 | public void setUp() | |
130 | throws Exception { | |
131 | // add additional set up code here | |
132 | } | |
133 | ||
134 | /** | |
135 | * Perform post-test clean-up. | |
136 | * | |
137 | * @throws Exception | |
138 | * if the clean-up fails for some reason | |
139 | * | |
140 | * @generatedBy CodePro at 03/05/12 2:29 PM | |
141 | */ | |
142 | @After | |
143 | public void tearDown() | |
144 | throws Exception { | |
145 | // Add additional tear down code here | |
146 | } | |
147 | ||
148 | /** | |
149 | * Launch the test. | |
150 | * | |
151 | * @param args the command line arguments | |
152 | * | |
153 | * @generatedBy CodePro at 03/05/12 2:29 PM | |
154 | */ | |
155 | public static void main(String[] args) { | |
156 | new org.junit.runner.JUnitCore().run(CtfLocationTest.class); | |
157 | } | |
158 | } |