org.eclipse.birt.report.tests.model.api
Class ScalarParameterHandleTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.eclipse.birt.report.tests.model.BaseTestCase
              extended byorg.eclipse.birt.report.tests.model.api.ScalarParameterHandleTest
All Implemented Interfaces:
junit.framework.Test

public class ScalarParameterHandleTest
extends BaseTestCase

Test ReportItemHandle.

Method Test Case Expected
testGetsPropertiesOnParameter() Gets the property values of scalar parameter by the ScalarParameterHandle. The returned value matches with the input file.
testSetsPropertiesOnParameter() Sets the property values of scalar parameter. Values are set correctly.
testSyntaxCheck() Checks the semantic error when data set name is missed. Throws PropertyValueException with the error code VALUE_REQUIRED.


Field Summary
 
Fields inherited from class org.eclipse.birt.report.tests.model.BaseTestCase
design, designHandle, GOLDEN_FOLDER, INPUT_FOLDER, OUTPUT_FOLDER, PLUGIN_NAME, PLUGIN_PATH, PLUGINLOC, ROM_DEF_NAME, sessionHandle, TEST_FOLDER, TEST_LOCALE
 
Constructor Summary
ScalarParameterHandleTest(java.lang.String name)
           
 
Method Summary
protected  void setUp()
           
static junit.framework.Test suite()
           
 void testGetsPropertiesOnParameter()
          Tests to read properties on scalar parameters.
 void testSetsPropertiesOnParameter()
          Sets properties on scalar parameters.
 void testSyntaxCheck()
          Tests the syntax check on ScalarParameter.
 
Methods inherited from class org.eclipse.birt.report.tests.model.BaseTestCase
compareErrors, compareTextFile, compareTextFileAsResource, createDesign, createDesign, dumpErrors, getClassFolder, getFullQualifiedClassName, openDesign, openDesign, openDesign, openDesign, openDesignAsResource, openDesignAsResource, printSemanticError, printSemanticErrors, printSyntaxError, saveAs, saveAsInTempDir, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScalarParameterHandleTest

public ScalarParameterHandleTest(java.lang.String name)
Parameters:
name -
Method Detail

suite

public static junit.framework.Test suite()

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class BaseTestCase
Throws:
java.lang.Exception

testGetsPropertiesOnParameter

public void testGetsPropertiesOnParameter()
Tests to read properties on scalar parameters.


testSetsPropertiesOnParameter

public void testSetsPropertiesOnParameter()
                                   throws java.lang.Exception
Sets properties on scalar parameters.

Throws:
java.lang.Exception

testSyntaxCheck

public void testSyntaxCheck()
                     throws java.lang.Exception
Tests the syntax check on ScalarParameter.

If the dynamic list is defined, it must have a data set name property.

Throws:
java.lang.Exception - if error occurs during parsing the designf file.