uk.ac.ucl.sse.omii.bpel.model._2006._08.pdd.tests
Class LoadPddTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by uk.ac.ucl.sse.omii.bpel.model._2006._08.pdd.tests.LoadPddTest
All Implemented Interfaces:
junit.framework.Test

public class LoadPddTest
extends junit.framework.TestCase

Testing the loading capabilities of our PDD model code. It has to be noted though that loading is not that important for our plug-in as we never have to read pdd files, but just generate them on user request given a bpel file.

The last test mentioned in this list is due to a bug in ActiveBPEL 2.0 where it accepts a pdd file according to the 2005 schema version, but requires the schema version to state it was 2004 in order to operate correctly. When loading, we should therefore convert the 2004 string to 2005 before creating an EMF resource on the contents of a file.

This bug is solved in ActiveBPEL 2.1 :)

Author:
Bruno Wassermann, written 5 Jul 2006

Constructor Summary
LoadPddTest(java.lang.String name)
           
 
Method Summary
static void main(java.lang.String[] args)
           
 void testLoadCorrectPdd()
          Testing whether can load successfully from correct pdd file and whether all contents in the model are as expected.
 void testLoadInvalidPdd()
          Testing that exception is thrown as expected when encountering an invalid pdd file.
 void testVersionConversion()
          Testing the above-mentioned conversion between version strings from pdd file.
 
Methods inherited from class junit.framework.TestCase
countTestCases, getName, run, run, runBare, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LoadPddTest

public LoadPddTest(java.lang.String name)
Method Detail

main

public static void main(java.lang.String[] args)

testLoadCorrectPdd

public void testLoadCorrectPdd()
                        throws java.io.IOException
Testing whether can load successfully from correct pdd file and whether all contents in the model are as expected. Ignoring the 2004-2005 version issue in this test by using modified pdd file.

Throws:
java.io.IOException

testLoadInvalidPdd

public void testLoadInvalidPdd()
                        throws java.io.IOException
Testing that exception is thrown as expected when encountering an invalid pdd file.

Throws:
java.io.IOException

testVersionConversion

public void testVersionConversion()
                           throws java.io.IOException
Testing the above-mentioned conversion between version strings from pdd file. Expecting loading to be transparent (even if 2004 is used in pdd) and loaded model instance to have 2005 as version string.

Throws:
java.io.IOException