Merge branch 'master' into lttng-kepler
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui.tests / src / org / eclipse / linuxtools / tmf / ui / tests / statistics / TmfStatisticsTreeNodeTest.java
1 /*******************************************************************************
2 * Copyright (c) 2011 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Mathieu Denis <mathieu.denis@polymtl.ca> - Initial design and implementation
11 * Bernd Hufmann - Fixed warnings
12 *******************************************************************************/
13
14 package org.eclipse.linuxtools.tmf.ui.tests.statistics;
15
16 import java.util.Collection;
17 import java.util.Iterator;
18 import java.util.Vector;
19
20 import junit.framework.TestCase;
21
22 import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
23 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
24 import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
25 import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
26 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
27 import org.eclipse.linuxtools.tmf.core.util.TmfFixedArray;
28 import org.eclipse.linuxtools.tmf.ui.viewers.statistics.ITmfExtraEventInfo;
29 import org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.AbsTmfStatisticsTree;
30 import org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.Messages;
31 import org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.TmfBaseStatisticsTree;
32 import org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.TmfStatisticsTreeNode;
33
34 /**
35 * TmfStatisticsTreeNode Test Cases.
36 */
37 @SuppressWarnings("nls")
38 public class TmfStatisticsTreeNodeTest extends TestCase {
39
40 // ------------------------------------------------------------------------
41 // Fields
42 // ------------------------------------------------------------------------
43 private String fTestName = null;
44
45
46 private final String fContext = "UnitTest";
47 private final String fTypeId1 = "Some type1";
48 private final String fTypeId2 = "Some type2";
49
50 private final String fLabel0 = "label1";
51 private final String fLabel1 = "label2";
52 private final String fLabel2 = "label3";
53 private final String[] fLabels = new String[] { fLabel0, fLabel1, fLabel2 };
54
55 private final TmfTimestamp fTimestamp1 = new TmfTimestamp(12345, (byte) 2, 5);
56 private final TmfTimestamp fTimestamp2 = new TmfTimestamp(12350, (byte) 2, 5);
57 private final TmfTimestamp fTimestamp3 = new TmfTimestamp(12355, (byte) 2, 5);
58
59 private final String fSource = "Source";
60
61 private final TmfEventType fType1 = new TmfEventType(fContext, fTypeId1, TmfEventField.makeRoot(fLabels));
62 private final TmfEventType fType2 = new TmfEventType(fContext, fTypeId2, TmfEventField.makeRoot(fLabels));
63
64 private final String fReference = "Some reference";
65
66 private final TmfEvent fEvent1;
67 private final TmfEvent fEvent2;
68 private final TmfEvent fEvent3;
69
70 private final TmfEventField fContent1;
71 private final TmfEventField fContent2;
72 private final TmfEventField fContent3;
73
74 private final TmfBaseStatisticsTree fStatsData;
75
76 private final ITmfExtraEventInfo fExtraInfo;
77
78 // ------------------------------------------------------------------------
79 // Housekeeping
80 // ------------------------------------------------------------------------
81
82 /**
83 * @param name
84 * Test name
85 */
86 public TmfStatisticsTreeNodeTest(final String name) {
87 super(name);
88
89 fTestName = name;
90
91 fContent1 = new TmfEventField(ITmfEventField.ROOT_FIELD_ID, "Some content");
92 fEvent1 = new TmfEvent(null, fTimestamp1, fSource, fType1, fContent1, fReference);
93
94 fContent2 = new TmfEventField(ITmfEventField.ROOT_FIELD_ID, "Some other content");
95 fEvent2 = new TmfEvent(null, fTimestamp2, fSource, fType1, fContent2, fReference);
96
97 fContent3 = new TmfEventField(ITmfEventField.ROOT_FIELD_ID, "Some other different content");
98 fEvent3 = new TmfEvent(null, fTimestamp3, fSource, fType2, fContent3, fReference);
99
100 fStatsData = new TmfBaseStatisticsTree();
101 fExtraInfo = new ITmfExtraEventInfo() {
102 @Override
103 public String getTraceName() {
104 return fTestName;
105 }
106 };
107 fStatsData.registerEvent(fEvent1, fExtraInfo);
108 fStatsData.registerEvent(fEvent1, fExtraInfo, 2);
109 fStatsData.registerEvent(fEvent2, fExtraInfo);
110 fStatsData.registerEvent(fEvent2, fExtraInfo, 3);
111 fStatsData.registerEvent(fEvent3, fExtraInfo);
112 fStatsData.registerEvent(fEvent3, fExtraInfo, 4);
113
114 // Registers some events in time range
115 fStatsData.registerEventInTimeRange(fEvent1, fExtraInfo);
116 fStatsData.registerEventInTimeRange(fEvent1, fExtraInfo, 3);
117 fStatsData.registerEventInTimeRange(fEvent2, fExtraInfo);
118 fStatsData.registerEventInTimeRange(fEvent2, fExtraInfo, 4);
119 fStatsData.registerEventInTimeRange(fEvent3, fExtraInfo);
120 fStatsData.registerEventInTimeRange(fEvent3, fExtraInfo, 5);
121 }
122
123 // ------------------------------------------------------------------------
124 // ContainsChild
125 // ------------------------------------------------------------------------
126
127 /**
128 * Test checking for child.
129 */
130 public void testContainsChild() {
131 TmfStatisticsTreeNode rootNode = fStatsData.get(AbsTmfStatisticsTree.ROOT);
132 TmfStatisticsTreeNode traceNode = fStatsData.get(new TmfFixedArray<String>(fTestName));
133 // Creates a category from the key already created
134 TmfStatisticsTreeNode catNode = traceNode.getChildren().iterator().next();
135
136 assertTrue("containsChild", rootNode.containsChild(fTestName));
137 assertFalse("containsChild", rootNode.containsChild(catNode.getKey()));
138 assertFalse("containsChild", rootNode.containsChild(null));
139
140 assertTrue("containsChild", traceNode.containsChild(catNode.getKey()));
141 assertFalse("containsChild", traceNode.containsChild(fType1.getName()));
142 assertFalse("containsChild", traceNode.containsChild(null));
143
144 assertTrue("containsChild", catNode.containsChild(fType1.getName()));
145 assertTrue("containsChild", catNode.containsChild(fType2.getName()));
146 assertFalse("containsChild", catNode.containsChild(null));
147 }
148
149 // ------------------------------------------------------------------------
150 // GetChildren
151 // ------------------------------------------------------------------------
152
153 /**
154 * Test getting of children.
155 */
156 public void testGetChildren() {
157 // Getting children of the ROOT
158 Collection<TmfStatisticsTreeNode> childrenTreeNode = fStatsData.get(AbsTmfStatisticsTree.ROOT).getChildren();
159 assertEquals("getChildren", 1, childrenTreeNode.size());
160 TmfStatisticsTreeNode treeNode = childrenTreeNode.iterator().next();
161 assertEquals("getChildren", fTestName, treeNode.getKey());
162
163 // Getting children of the trace
164 childrenTreeNode = fStatsData.get(new TmfFixedArray<String>(fTestName)).getChildren();
165 assertEquals("getChildren", 1, childrenTreeNode.size());
166 treeNode = childrenTreeNode.iterator().next();
167 assertEquals("getChildren", Messages.TmfStatisticsData_EventTypes, treeNode.getKey());
168
169 Vector<String> keyExpected = new Vector<String>();
170 keyExpected.add(fType1.getName());
171 keyExpected.add(fType2.getName());
172 // Getting children of a category
173 childrenTreeNode = treeNode.getChildren();
174 assertEquals("getChildren", 2, childrenTreeNode.size());
175
176 Iterator<TmfStatisticsTreeNode> iterChild = childrenTreeNode.iterator();
177 TmfStatisticsTreeNode temp;
178 while (iterChild.hasNext()) {
179 temp = iterChild.next();
180 if (keyExpected.contains(temp.getKey())) {
181 keyExpected.removeElement(temp.getKey());
182 } else {
183 fail();
184 }
185 }
186
187 // Get children of a specific event type
188 childrenTreeNode = fStatsData.get(childrenTreeNode.iterator().next().getPath()).getChildren();
189 assertEquals("getChildren", 0, childrenTreeNode.size());
190 }
191
192 // ------------------------------------------------------------------------
193 // GetAllChildren
194 // ------------------------------------------------------------------------
195
196 /**
197 * Test getting of all children.
198 */
199 public void testGetAllChildren() {
200 // Getting children of the ROOT
201 Collection<TmfStatisticsTreeNode> childrenTreeNode = fStatsData.get(AbsTmfStatisticsTree.ROOT).getAllChildren();
202 assertEquals("getChildren", 1, childrenTreeNode.size());
203 TmfStatisticsTreeNode treeNode = childrenTreeNode.iterator().next();
204 assertEquals("getChildren", fTestName, treeNode.getKey());
205
206 // Getting children of the trace
207 childrenTreeNode = fStatsData.get(new TmfFixedArray<String>(fTestName)).getAllChildren();
208 assertEquals("getChildren", 1, childrenTreeNode.size());
209 treeNode = childrenTreeNode.iterator().next();
210 assertEquals("getChildren", Messages.TmfStatisticsData_EventTypes, treeNode.getKey());
211
212 Vector<String> keyExpected = new Vector<String>();
213 keyExpected.add(fType1.getName());
214 keyExpected.add(fType2.getName());
215 /*
216 * It should return the eventType even though the number of events
217 * equals 0
218 */
219 fStatsData.get(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes, fType1.getName())).reset();
220 // Getting children of a category
221 childrenTreeNode = treeNode.getAllChildren();
222 assertEquals("getChildren", 2, childrenTreeNode.size());
223
224 Iterator<TmfStatisticsTreeNode> iterChild = childrenTreeNode.iterator();
225 TmfStatisticsTreeNode temp;
226 while (iterChild.hasNext()) {
227 temp = iterChild.next();
228 if (keyExpected.contains(temp.getKey())) {
229 keyExpected.removeElement(temp.getKey());
230 } else {
231 fail();
232 }
233 }
234
235 // Get children of a specific event type
236 childrenTreeNode = fStatsData.get(childrenTreeNode.iterator().next().getPath()).getAllChildren();
237 assertEquals("getChildren", 0, childrenTreeNode.size());
238 }
239
240 // ------------------------------------------------------------------------
241 // GetNbChildren
242 // ------------------------------------------------------------------------
243
244 /**
245 * Test getting of number of children.
246 */
247 public void testGetNbChildren() {
248 TmfStatisticsTreeNode rootNode = fStatsData.get(AbsTmfStatisticsTree.ROOT);
249 TmfStatisticsTreeNode traceNode = fStatsData.get(new TmfFixedArray<String>(fTestName));
250 TmfStatisticsTreeNode catNode = traceNode.getChildren().iterator().next();
251 TmfStatisticsTreeNode elementNode = fStatsData.get(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes, fType1.getName()));
252
253 assertEquals("getNbChildren", 1, rootNode.getNbChildren());
254 assertEquals("getNbChildren", 1, traceNode.getNbChildren());
255 assertEquals("getNbChildren", 2, catNode.getNbChildren());
256 assertEquals("getNbChildren", 0, elementNode.getNbChildren());
257 }
258
259 // ------------------------------------------------------------------------
260 // HasChildren
261 // ------------------------------------------------------------------------
262
263 /**
264 * Test checking for children.
265 */
266 public void testHasChildren() {
267 TmfStatisticsTreeNode rootNode = fStatsData.get(AbsTmfStatisticsTree.ROOT);
268 TmfStatisticsTreeNode traceNode = fStatsData.get(new TmfFixedArray<String>(fTestName));
269 TmfStatisticsTreeNode catNode = traceNode.getChildren().iterator().next();
270 TmfStatisticsTreeNode elementNode = fStatsData.get(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes, fType1.getName()));
271
272 assertTrue("hasChildren", rootNode.hasChildren());
273 assertTrue("hasChildren", traceNode.hasChildren());
274 assertTrue("hasChildren", catNode.hasChildren());
275 assertFalse("hasChildren", elementNode.hasChildren());
276 }
277
278 // ------------------------------------------------------------------------
279 // GetParent
280 // ------------------------------------------------------------------------
281
282 /**
283 * Test getting of parent.
284 */
285 public void testGetParent() {
286 TmfStatisticsTreeNode rootNode = fStatsData.get(AbsTmfStatisticsTree.ROOT);
287 TmfStatisticsTreeNode parentNode = rootNode.getParent();
288 assertNull("getParent", parentNode);
289
290 TmfStatisticsTreeNode newTraceNode = new TmfStatisticsTreeNode(new TmfFixedArray<String>("newly created trace node"), fStatsData);
291 parentNode = newTraceNode.getParent();
292 assertNotNull("getParent", parentNode);
293 assertEquals("getParent", 0, parentNode.getKey().compareTo(fStatsData.get(AbsTmfStatisticsTree.ROOT).getKey().toString()));
294
295 TmfStatisticsTreeNode traceNode = fStatsData.get(new TmfFixedArray<String>(fTestName));
296 parentNode = traceNode.getParent();
297 assertNotNull("getParent", parentNode);
298 assertEquals("getParent", 0, parentNode.getPath().toString().compareTo(AbsTmfStatisticsTree.ROOT.toString()));
299
300 TmfStatisticsTreeNode newNode = new TmfStatisticsTreeNode(new TmfFixedArray<String>("TreeNode", Messages.TmfStatisticsData_EventTypes, "TreeNode that should not exist"), fStatsData);
301 parentNode = newNode.getParent();
302 assertNull("getParent", parentNode);
303
304 TmfStatisticsTreeNode elementNode = fStatsData.get(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes, fType1.getName()));
305 parentNode = elementNode.getParent();
306 assertNull("getParent", parentNode);
307
308 TmfStatisticsTreeNode catNode = traceNode.getChildren().iterator().next();
309 parentNode = catNode.getParent();
310 assertNotNull("getParent", parentNode);
311 assertEquals("getParent", 0, parentNode.getPath().toString().compareTo(fStatsData.get(new TmfFixedArray<String>(fTestName)).getPath().toString()));
312
313 parentNode = elementNode.getParent();
314 assertNotNull("getParent", parentNode);
315 assertTrue("getParent", parentNode.getPath().equals(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes)));
316 }
317
318 // ------------------------------------------------------------------------
319 // GetKey
320 // ------------------------------------------------------------------------
321
322 /**
323 * Test getting of key.
324 */
325 public void testGetKey() {
326 TmfStatisticsTreeNode rootNode = fStatsData.get(AbsTmfStatisticsTree.ROOT);
327 TmfStatisticsTreeNode traceNode = fStatsData.get(new TmfFixedArray<String>(fTestName));
328 TmfStatisticsTreeNode catNode = traceNode.getChildren().iterator().next();
329 TmfStatisticsTreeNode elementNode = fStatsData.get(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes, fType1.getName()));
330
331 assertEquals("getKey", 0, rootNode.getKey().compareTo(AbsTmfStatisticsTree.ROOT.get(0)));
332 assertEquals("getKey", 0, traceNode.getKey().compareTo(fTestName));
333 assertEquals("getKey", 0, catNode.getKey().compareTo(Messages.TmfStatisticsData_EventTypes));
334 assertEquals("getKey", 0, elementNode.getKey().compareTo(fType1.getName()));
335 }
336
337 // ------------------------------------------------------------------------
338 // GetPath
339 // ------------------------------------------------------------------------
340
341 /**
342 * Test getting of path to node.
343 */
344 public void testGetPath() {
345 TmfStatisticsTreeNode rootNode = fStatsData.get(AbsTmfStatisticsTree.ROOT);
346 TmfStatisticsTreeNode traceNode = fStatsData.get(new TmfFixedArray<String>(fTestName));
347 TmfStatisticsTreeNode catNode = traceNode.getChildren().iterator().next();
348 TmfStatisticsTreeNode elementNode = fStatsData.get(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes, fType1.getName()));
349
350 assertTrue("getPath", rootNode.getPath().equals(AbsTmfStatisticsTree.ROOT));
351 assertTrue("getPath", traceNode.getPath().equals(new TmfFixedArray<String>(fTestName)));
352 assertTrue("getPath", catNode.getPath().equals(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes)));
353 assertTrue("getPath", elementNode.getPath().equals(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes, fType1.getName())));
354 }
355
356 // ------------------------------------------------------------------------
357 // GetValue
358 // ------------------------------------------------------------------------
359
360 /**
361 * Test getting statistic value.
362 */
363 public void testGetValue() {
364 TmfStatisticsTreeNode rootNode = fStatsData.get(AbsTmfStatisticsTree.ROOT);
365 TmfStatisticsTreeNode traceNode = fStatsData.get(new TmfFixedArray<String>(fTestName));
366 TmfStatisticsTreeNode catNode = traceNode.getChildren().iterator().next();
367 TmfStatisticsTreeNode elementNode1 = fStatsData.get(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes, fType1.getName()));
368 TmfStatisticsTreeNode elementNode3 = fStatsData.get(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes, fType2.getName()));
369
370 assertEquals("getValue", 0, rootNode.getValue().getTotal());
371 assertEquals("getValue", 12, traceNode.getValue().getTotal());
372 assertEquals("getValue", 0, catNode.getValue().getTotal());
373 assertEquals("getValue", 7, elementNode1.getValue().getTotal());
374 assertEquals("getValue", 5, elementNode3.getValue().getTotal());
375
376 assertEquals("getValue", 0, rootNode.getValue().getPartial());
377 assertEquals("getValue", 15, traceNode.getValue().getPartial());
378 assertEquals("getValue", 0, catNode.getValue().getPartial());
379 assertEquals("getValue", 9, elementNode1.getValue().getPartial());
380 assertEquals("getValue", 6, elementNode3.getValue().getPartial());
381 }
382
383 // ------------------------------------------------------------------------
384 // Reset
385 // ------------------------------------------------------------------------
386
387 /**
388 * Test reset of tree.
389 */
390 public void testReset() {
391 TmfStatisticsTreeNode rootNode = fStatsData.get(AbsTmfStatisticsTree.ROOT);
392 TmfStatisticsTreeNode traceNode = fStatsData.get(new TmfFixedArray<String>(fTestName));
393 TmfStatisticsTreeNode catNode = traceNode.getChildren().iterator().next();
394 TmfStatisticsTreeNode elementNode = fStatsData.get(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes, fType1.getName()));
395
396 elementNode.reset();
397 assertEquals("reset", 0, elementNode.getValue().getTotal());
398 assertEquals("reset", 0, elementNode.getValue().getPartial());
399
400 catNode.reset();
401 assertEquals("reset", 0, catNode.getValue().getTotal());
402 assertEquals("reset", 0, catNode.getValue().getPartial());
403 assertEquals("reset", 0, catNode.getNbChildren());
404 assertNull("reset", fStatsData.get(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes, fType1.getName())));
405
406 traceNode.reset();
407 assertEquals("reset", 0, traceNode.getValue().getTotal());
408 assertEquals("reset", 0, traceNode.getValue().getPartial());
409 // A trace always have at least one child that is eventType
410 assertEquals("reset", 1, traceNode.getNbChildren());
411
412 rootNode.reset();
413 assertEquals("reset", 0, rootNode.getValue().getTotal());
414 assertEquals("reset", 0, rootNode.getValue().getPartial());
415 assertEquals("reset", 1, rootNode.getNbChildren());
416 }
417
418 /**
419 * Test reset global value of the node in the tree. It should only clear
420 * the global value without removing any node from the tree.
421 */
422 public void testResetGlobalValue() {
423 TmfStatisticsTreeNode rootNode = fStatsData.get(AbsTmfStatisticsTree.ROOT);
424 TmfStatisticsTreeNode traceNode = fStatsData.get(new TmfFixedArray<String>(fTestName));
425 TmfStatisticsTreeNode catNode = traceNode.getChildren().iterator().next();
426 TmfStatisticsTreeNode eventTypeNode1 = fStatsData.get(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes, fType1.getName()));
427 TmfStatisticsTreeNode eventTypeNode2 = fStatsData.get(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes, fType2.getName()));
428
429 rootNode.resetGlobalValue();
430
431 assertEquals(0, rootNode.getValue().getTotal());
432 assertEquals(0, traceNode.getValue().getTotal());
433 assertEquals(0, catNode.getValue().getTotal());
434 assertEquals(0, eventTypeNode1.getValue().getTotal());
435 assertEquals(0, eventTypeNode2.getValue().getTotal());
436
437 // Checks the state of the statistics tree
438 Collection<TmfStatisticsTreeNode> rootChildren = rootNode.getAllChildren();
439 assertEquals(1, rootChildren.size());
440 assertTrue(rootChildren.contains(traceNode));
441
442 Collection<TmfStatisticsTreeNode> traceChildren = traceNode.getAllChildren();
443 assertEquals(1, traceChildren.size());
444 assertTrue(traceChildren.contains(catNode));
445
446 Collection<TmfStatisticsTreeNode> catChildren = catNode.getAllChildren();
447 assertEquals(2, catChildren.size());
448 assertTrue(catChildren.contains(eventTypeNode1));
449 assertTrue(catChildren.contains(eventTypeNode2));
450 }
451
452 /**
453 * Test reset time range value of the node in the tree. It should only clear
454 * the time range value without removing any node from the tree.
455 */
456 public void testResetTimeRangeValue() {
457 TmfStatisticsTreeNode rootNode = fStatsData.get(AbsTmfStatisticsTree.ROOT);
458 TmfStatisticsTreeNode traceNode = fStatsData.get(new TmfFixedArray<String>(fTestName));
459 TmfStatisticsTreeNode catNode = traceNode.getChildren().iterator().next();
460 TmfStatisticsTreeNode eventTypeNode1 = fStatsData.get(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes, fType1.getName()));
461 TmfStatisticsTreeNode eventTypeNode2 = fStatsData.get(new TmfFixedArray<String>(fTestName, Messages.TmfStatisticsData_EventTypes, fType2.getName()));
462
463 rootNode.resetTimeRangeValue();
464
465 assertEquals(0, rootNode.getValue().getPartial());
466 assertEquals(0, traceNode.getValue().getPartial());
467 assertEquals(0, catNode.getValue().getPartial());
468 assertEquals(0, eventTypeNode1.getValue().getPartial());
469 assertEquals(0, eventTypeNode2.getValue().getPartial());
470
471 // Checks the state of the statistics tree
472 Collection<TmfStatisticsTreeNode> rootChildren = rootNode.getAllChildren();
473 assertEquals(1, rootChildren.size());
474 assertTrue(rootChildren.contains(traceNode));
475
476 Collection<TmfStatisticsTreeNode> traceChildren = traceNode.getAllChildren();
477 assertEquals(1, traceChildren.size());
478 assertTrue(traceChildren.contains(catNode));
479
480 Collection<TmfStatisticsTreeNode> catChildren = catNode.getAllChildren();
481 assertEquals(2, catChildren.size());
482 assertTrue(catChildren.contains(eventTypeNode1));
483 assertTrue(catChildren.contains(eventTypeNode2));
484 }
485 }
This page took 0.063175 seconds and 6 git commands to generate.