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

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.ReportElementHandleTest
All Implemented Interfaces:
junit.framework.Test

public class ReportElementHandleTest
extends BaseTestCase

Test ReportItemHandle.

.
Method Test Case Expected
testPropertyMaskFromPropertyHandle() Sets and gets the valid property mask by the property handle. The value is set correctly.
Sets and gets the invalid value of the property mask. Throws PropertyValueException with the error code CHOICE_NOT_FOUND.
Sets and gets the mask on the invalid property. The property mask is null.
testPropertyMaskOnProperty() Reads a local mask on the label.. The mask value matches with the input file.
Reads a mask from a invalid property. Return null
Reads a mask inherited from the parent and grandparent. Mask values follows the inheritance mechanism.
Sets a property mask and checks masks on three labels. Mask values follows the inheritance mechanism.
Sets a property value with the "locked" mask. Throws PropertyValueException with the error code: VALUE_LOCKED
Sets a property value with the "change" and "hide" mask. Value is set correctly.
Gets a property value with the "lock", "hide" and "change" masks. Value is returned correctly.


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
ReportElementHandleTest(java.lang.String name)
           
 
Method Summary
protected  void setUp()
           
static junit.framework.Test suite()
           
 void testPropertyMaskFromPropertyHandle()
          Tests property masks of an element.
 void testPropertyMaskOnListGroup()
          Tests whether property mask can be set on an element that is not report element.
 void testPropertyMaskOnMethod()
          Tests the property mask on method.
 void testPropertyMaskOnProperty()
          Tests property masks of an element.
 
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

ReportElementHandleTest

public ReportElementHandleTest(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

testPropertyMaskFromPropertyHandle

public void testPropertyMaskFromPropertyHandle()
                                        throws java.lang.Exception
Tests property masks of an element. Following methods have been tested:

Throws:
java.lang.Exception - if any exception

testPropertyMaskOnProperty

public void testPropertyMaskOnProperty()
                                throws java.lang.Exception
Tests property masks of an element. Following methods have been tested:

Test cases:

Throws:
java.lang.Exception - if any exception

testPropertyMaskOnMethod

public void testPropertyMaskOnMethod()
                              throws org.eclipse.birt.report.model.api.activity.SemanticException
Tests the property mask on method.

Throws:
org.eclipse.birt.report.model.api.activity.SemanticException - if any exception

testPropertyMaskOnListGroup

public void testPropertyMaskOnListGroup()
Tests whether property mask can be set on an element that is not report element.