|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.eclipse.birt.report.tests.model.BaseTestCase
org.eclipse.birt.report.tests.model.api.DimensionHandleTest
Test DimensionHandle.
Method | Test Case | Expected | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
testGetDisplayValue() |
value is from an choice | display value is from message file of the locale | |||||||||
value is a dimension value, locale is English, China | display value is locale-specific | ||||||||||
value is a dimension value of a highlight member, locales are English, China | display value is locale-specific and matches with the design file. | ||||||||||
testGetStringValue() |
value is from an choice | return should be the choice name | |||||||||
value is a real dimension | return should be the dimension in string | ||||||||||
value is a member of a highlight. | returned value matches with the value in the design file. | ||||||||||
testSetValue() |
property type is dimension with choices | set the value to an choice | |||||||||
property type is dimension with choices | set the value to "12pt" | ||||||||||
application unit is "cm", set the value to 12( double ) | the dimension should be set using the application unit | ||||||||||
Sets a dimension value to a highlight member | The value is set and the value matches with the output file. | ||||||||||
testIsKeyword() |
value is "larger" from an choice. | is a keyword | |||||||||
value is a real dimension value -- "12pt". | not a keyword | ||||||||||
testGetMeasure() |
dimension is from an choice | return should be 0.0 | |||||||||
a real dimension | return is the numeric part of it. | ||||||||||
value is a dimension value of a highlight member | The measure matches with the set value. | ||||||||||
testGetUnits() |
dimension is from an choice | return should be DimensionValue.DEFAULT_UNIT |
|||||||||
a real dimension | return should be the corresponding unit of it. | ||||||||||
value is a dimension value of a highlight member | The unit matches with the set value. |
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 | |
DimensionHandleTest(java.lang.String name)
|
Method Summary | |
protected void |
setUp()
|
static junit.framework.Test |
suite()
|
void |
testComputedValue()
Tests the computed dimension value. |
void |
testFontSizeAbsoluteValue()
Tests the computation the relative dimension value with the relative value. |
void |
testGetDisplayValue()
test getDisplayValue(). |
void |
testGetMeasure()
test getMeasure(). |
void |
testGetStringValue()
test getStringValue(). |
void |
testGetUnits()
Test getUnits(). |
void |
testIsKeyword()
Test isKeyword(). |
void |
testSetValue()
Test setValue( String ) and setValue( double ). |
void |
testUnits()
Tests all the cases without a unit. |
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 |
public DimensionHandleTest(java.lang.String name)
name
- Method Detail |
public static junit.framework.Test suite()
protected void setUp() throws java.lang.Exception
setUp
in class BaseTestCase
java.lang.Exception
public void testGetDisplayValue()
1. value is from an choice, display value is from message file of the locale.
2. value is a dimension value, locale is English, China display value is locale-specific.
public void testGetStringValue()
1. value is from an choice, return should be the choice name.
2. value is a real dimension, return should be the dimension in string.
public void testSetValue() throws java.lang.Exception
1. property type is dimension with choices, set the value to an choice.
2. property type is dimension with choices, set the value to "12pt"
3. application unit is "cm", set the value to 12( double ), the dimension should be set using the application unit.
java.lang.Exception
- if the value is invalid or the output file cannot be saved on
the storage.public void testIsKeyword() throws org.eclipse.birt.report.model.api.activity.SemanticException
1. value is "larger" from an choice.
2. value is a real dimension value -- "12pt".
org.eclipse.birt.report.model.api.activity.SemanticException
public void testGetMeasure() throws org.eclipse.birt.report.model.api.activity.SemanticException
1. dimension is from an choice, return should be 0.0
2. a real dimension, return is the numeric part of it.
org.eclipse.birt.report.model.api.activity.SemanticException
public void testGetUnits() throws org.eclipse.birt.report.model.api.activity.SemanticException
1. dimension is from an choice, return should be
DimensionValue.DEFAULT_UNIT
2. a real dimension, return should be the corresponding unit of it.
org.eclipse.birt.report.model.api.activity.SemanticException
public void testComputedValue()
public void testFontSizeAbsoluteValue() throws org.eclipse.birt.report.model.api.activity.SemanticException
org.eclipse.birt.report.model.api.activity.SemanticException
public void testUnits() throws java.lang.Exception
java.lang.Exception
- if any exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |