/*******************************************************************************
* Copyright (c) 2010 Martin Schnabel <mb0@mb0.org>.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
package org.axdt.as3.model;
import junit.textui.TestRunner;
import org.axdt.as3.As3EFactory;
import org.axdt.avm.model.AvmNull;
import org.axdt.avm.util.AvmTypeAccess;
/**
* <!-- begin-user-doc -->
* A test case for the model object '<em><b>As3 Null Literal</b></em>'.
* <!-- end-user-doc -->
* @generated
*/
public class As3NullLiteralTest extends IExpressionTest {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static void main(String[] args) {
TestRunner.run(As3NullLiteralTest.class);
}
/**
* Constructs a new As3 Null Literal test case with the given name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public As3NullLiteralTest(String name) {
super(name);
}
/**
* Returns the fixture for this As3 Null Literal test case.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected As3NullLiteral getFixture() {
return (As3NullLiteral)fixture;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see junit.framework.TestCase#setUp()
* @generated
*/
@Override
protected void setUp() throws Exception {
setFixture(As3EFactory.eINSTANCE.createAs3NullLiteral());
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see junit.framework.TestCase#tearDown()
* @generated
*/
@Override
protected void tearDown() throws Exception {
setFixture(null);
}
/**
* Tests the '{@link org.axdt.as3.model.IExpression#resolveType() <em>Resolve Type</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.axdt.as3.model.IExpression#resolveType()
*/
public void testResolveType() {
// uses a static value and no type proxy
AvmTypeAccess type = getFixture().resolveType();
assertNotNull(type);
assertTrue(type.getType() instanceof AvmNull);
}
} //As3NullLiteralTest