1 /*******************************************************************************
2 * Copyright (c) 2013 Ericsson
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * Matthew Khouzam - Initial API and implementation
10 *******************************************************************************/
12 package org
.eclipse
.linuxtools
.ctf
.core
.tests
.types
;
14 import static org
.junit
.Assert
.assertNotNull
;
16 import org
.eclipse
.jdt
.annotation
.NonNull
;
17 import org
.eclipse
.linuxtools
.ctf
.core
.event
.scope
.IDefinitionScope
;
18 import org
.eclipse
.linuxtools
.ctf
.core
.event
.types
.Definition
;
19 import org
.eclipse
.linuxtools
.ctf
.core
.event
.types
.IDeclaration
;
20 import org
.eclipse
.linuxtools
.ctf
.core
.event
.types
.IDefinition
;
21 import org
.eclipse
.linuxtools
.ctf
.core
.event
.types
.StringDeclaration
;
22 import org
.junit
.Test
;
25 * The class <code>DefinitionTest</code> contains tests for the class
26 * <code>{@link Definition}</code>.
28 * @author Matthew Khouzam
29 * @version $Revision: 1.0 $
31 public class DefinitionTest
{
34 * Since Definition is abstract, we'll minimally extend it here to
37 static class DefTest
extends Definition
{
40 private static final StringDeclaration STRINGDEF
= new StringDeclaration();
42 public DefTest(IDefinitionScope definitionScope
, @NonNull String fieldName
) {
43 super(DefTest
.STRINGDEF
, definitionScope
, fieldName
);
48 public IDeclaration
getDeclaration() {
49 return DefTest
.STRINGDEF
;
58 public void testToString() {
59 IDefinition fixture
= new DefTest(null, "Hello");
60 String result
= fixture
.toString();
62 assertNotNull(result
);