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

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

public class PropertySortingTest
extends BaseTestCase

Test property sorting feature. PropertyIterator and MemberIterator should return Properties and Members that have been sorted by there display names.

StructureIterator return the Structures as they were stored.

This test use the 3 Iterators to traverse over an Style element. Dump all it's property names and member names inside a structure into a file.

Method Test Case Expected
test_EN() Locale is English, traverse over an Style element and dump its localized property names int to "propertyIterator_EN.out" The result file should include all property names of Style according to metadata definition. Property Display Names is defined in "Messages_EN.properties". Member properties of a structure should also be sorted by their display name. The structure of the ouput file is like this:
   Axx
   Group1.A
   Group1.B
   Hxx
        A_Member
        B_Member
        C_Member
   Jxx.Bxx
  
test_zh_CN() The same as above. Except that Locale is China and output file is "propertyIterator_zh_CN.out" The same as above. The display names is defined in "Messages_zh_CN.properties".


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
PropertySortingTest(java.lang.String name)
           
 
Method Summary
static junit.framework.Test suite()
           
 void test_EN()
          Test PropertyIterator on ENGLISH locale.
 void test_zh_CN()
          Test PropertyIterator on CHINA locale.
 
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, setUp, 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

PropertySortingTest

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

suite

public static junit.framework.Test suite()

test_EN

public void test_EN()
             throws java.lang.Exception
Test PropertyIterator on ENGLISH locale.

Throws:
java.lang.Exception

test_zh_CN

public void test_zh_CN()
                throws java.lang.Exception
Test PropertyIterator on CHINA locale.

Throws:
java.lang.Exception