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

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

public class ActionHandleTest
extends BaseTestCase

TestCases for ActionHandle class. ActionHandle should be got from the specific ElementHandle that contains an Action.

Method Test Case Expected
testAddDrillthroughParameter() Add a new DrillthroughParameter to an Action. The Parameter should be added to the Element that contains Action.
testaddDrillthroughSearchKeys() Add a new DrillthroughSearchKey to an Action. The SearchKey should be added to the Element that contains Action.
testGetDrillthroughParameters() The Action is of Drillthrough type and containing 2 parameters. A list contains 2 DrillthroughParameters. And the Expression value of the Parameter is correct
testGetDrillthroughSearchKeys() The Action is of Drillthrough type and containing 2 searchKeys. A list conains 2 SearchKeys. And the Expression value of the SearchKey is correct
testGetLinkExpr() Action is represented by a Hyperlink. LinkExpression should be the value of the Hyperlink.
Action is represented by a Drillthrough. LinkExpression should be the value of the BookmarkLink for the Drillthrough.
Action is represented by a BookmarkLink. LinkExpression should be the value of the BookmarkLink.
testGetLinkType() Action is represented by a Hyperlink. LinkType should be Hyperlink.
Action is represented by a Drillthrough. LinkType should be Drillthrough.
Action is represented by a BookmarkLink. LinkType should be BookmarkLink.
testSetLinkExpr() Action is represented by a Hyperlink. Set its Link Expression. Value of the Expression is properly set.


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
ActionHandleTest(java.lang.String name)
           
 
Method Summary
protected  void setUp()
           
static junit.framework.Test suite()
           
 void testAdd()
           
 void testAddDrillthroughParameter()
          test addDrillthroughtParameter().
 void testaddDrillthroughSearchKeys()
          test addDrillthroughtSearchKeys().
 void testGetDrillthroughParameters()
          Test getDrillthroughParameters().
 void testGetDrillthroughSearchKeys()
          test getDrillthroughSearchKeys().
 void testGetLinkExpr()
          Case1: Action is represented by a Hyperlink.
 void testGetLinkType()
          Test getLinkType().
 void testOtherMethods()
          Test methods like get/set targetwindow.
 void testSetLinkExpr()
          test setLinkExpr().
 
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

ActionHandleTest

public ActionHandleTest(java.lang.String 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

testAdd

public void testAdd()
             throws java.lang.Exception
Throws:
java.lang.Exception

testGetLinkExpr

public void testGetLinkExpr()
                     throws java.lang.Exception
Case1: Action is represented by a Hyperlink. LinkExpression should be the value of the Hyperlink.

Case2: Action is represented by a Drillthrough. LinkExpression should be the value of the BookmarkLink for the Drillthrough.

Case3: Action is represented by a BookmarkLink. LinkExpression should be the value of the BookmarkLink.

Throws:
java.lang.Exception

testSetLinkExpr

public void testSetLinkExpr()
                     throws org.eclipse.birt.report.model.api.activity.SemanticException
test setLinkExpr().

Throws:
org.eclipse.birt.report.model.api.activity.SemanticException

testGetLinkType

public void testGetLinkType()
                     throws java.lang.Exception
Test getLinkType(). Case1: Action is represented by a Hyperlink. LinkType should be Hyperlink.

Case2: Action is represented by a Drillthrough. LinkType should be Drillthrough.

Case3: Action is represented by a BookmarkLink. LinkType should be BookmarkLink.

Throws:
java.lang.Exception

testGetDrillthroughParameters

public void testGetDrillthroughParameters()
                                   throws java.lang.Exception
Test getDrillthroughParameters(). Get a List from the element that conains the Action. The list conains 2 DrillthroughParameters.

Throws:
java.lang.Exception

testAddDrillthroughParameter

public void testAddDrillthroughParameter()
                                  throws java.lang.Exception
test addDrillthroughtParameter(). Add a new DrillthroughParameter to an Action.

Throws:
java.lang.Exception

testGetDrillthroughSearchKeys

public void testGetDrillthroughSearchKeys()
                                   throws java.lang.Exception
test getDrillthroughSearchKeys().

Throws:
java.lang.Exception

testaddDrillthroughSearchKeys

public void testaddDrillthroughSearchKeys()
                                   throws java.lang.Exception
test addDrillthroughtSearchKeys(). Add a new DrillthroughSearchKey to an Action.

Throws:
java.lang.Exception

testOtherMethods

public void testOtherMethods()
                      throws java.lang.Exception
Test methods like get/set targetwindow.

Throws:
java.lang.Exception