~ubuntu-branches/ubuntu/trusty/eclipse-linuxtools/trusty

« back to all changes in this revision

Viewing changes to lttng/org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/control/model/impl/TraceInfoTest.java

  • Committer: Package Import Robot
  • Author(s): tony mancill
  • Date: 2013-05-13 21:43:22 UTC
  • mfrom: (1.2.1) (2.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20130513214322-6frgd9du1n0w2uo7
Tags: 1.2.1-1
* Team upload.
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**********************************************************************
2
2
 * Copyright (c) 2012 Ericsson
3
 
 * 
 
3
 *
4
4
 * All rights reserved. This program and the accompanying materials are
5
5
 * made available under the terms of the Eclipse Public License v1.0 which
6
6
 * accompanies this distribution, and is available at
7
7
 * http://www.eclipse.org/legal/epl-v10.html
8
 
 * 
9
 
 * Contributors: 
 
8
 *
 
9
 * Contributors:
10
10
 *   Bernd Hufmann - Initial API and implementation
11
11
 **********************************************************************/
12
12
package org.eclipse.linuxtools.lttng2.core.tests.control.model.impl;
19
19
/**
20
20
 * The class <code>TraceInfoTest</code> contains test for the class <code>{@link TraceInfo}</code>.
21
21
 */
22
 
@SuppressWarnings("nls")
 
22
@SuppressWarnings({"nls", "javadoc"})
23
23
public class TraceInfoTest extends TestCase {
24
24
 
25
25
    // ------------------------------------------------------------------------
27
27
    // ------------------------------------------------------------------------
28
28
    private ITraceInfo fTraceInfo1 = null;
29
29
    private ITraceInfo fTraceInfo2 = null;
30
 
   
31
 
    
 
30
 
 
31
 
32
32
    // ------------------------------------------------------------------------
33
33
    // Housekeeping
34
34
    // ------------------------------------------------------------------------
65
65
    public void testTraceInfo() {
66
66
        TraceInfo fixture = new TraceInfo("event");
67
67
        assertNotNull(fixture);
68
 
        
 
68
 
69
69
        assertEquals("event", fixture.getName());
70
70
    }
71
71
 
82
82
            // Success
83
83
        }
84
84
    }
85
 
    
 
85
 
86
86
    /**
87
87
     * Test Copy Constructor
88
88
     */
89
89
    public void testTraceInfoCopy() {
90
90
        TraceInfo info = new TraceInfo((TraceInfo)fTraceInfo1);
91
 
        
 
91
 
92
92
        assertEquals(fTraceInfo1.getName(), info.getName());
93
93
    }
94
94
 
105
105
            // Success
106
106
        }
107
107
    }
108
 
    
 
108
 
109
109
    /**
110
110
     * Run the void setEventType(String) method test.
111
111
     *
126
126
        // add additional test code here
127
127
        assertEquals("[TraceInfo(Name=event1)]", result);
128
128
    }
129
 
    
 
129
 
130
130
    // ------------------------------------------------------------------------
131
131
    // equals
132
132
    // ------------------------------------------------------------------------
138
138
        assertTrue("equals", !fTraceInfo1.equals(fTraceInfo2));
139
139
        assertTrue("equals", !fTraceInfo2.equals(fTraceInfo1));
140
140
    }
141
 
    
 
141
 
142
142
    public void testEqualsSymmetry() {
143
143
        TraceInfo info1 = new TraceInfo((TraceInfo)fTraceInfo1);
144
144
        TraceInfo info2 = new TraceInfo((TraceInfo)fTraceInfo2);
149
149
        assertTrue("equals", info2.equals(fTraceInfo2));
150
150
        assertTrue("equals", fTraceInfo2.equals(info2));
151
151
    }
152
 
    
 
152
 
153
153
    public void testEqualsTransivity() {
154
154
        TraceInfo info1 = new TraceInfo((TraceInfo)fTraceInfo1);
155
155
        TraceInfo info2 = new TraceInfo((TraceInfo)fTraceInfo1);
159
159
        assertTrue("equals", info2.equals(info3));
160
160
        assertTrue("equals", info1.equals(info3));
161
161
    }
162
 
    
 
162
 
163
163
    public void testEqualsNull() {
164
164
        assertTrue("equals", !fTraceInfo1.equals(null));
165
165
        assertTrue("equals", !fTraceInfo2.equals(null));
166
166
    }
167
 
    
 
167
 
168
168
    // ------------------------------------------------------------------------
169
169
    // hashCode
170
170
    // ------------------------------------------------------------------------