wt.step.processor
Class ImportTestHarness

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended bywt.step.STEPTestCase
              extended bywt.step.processor.ImportTestHarness
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
ImportTest

public class ImportTestHarness
extends STEPTestCase

Test Harness for construction of test import data in Windchill Schema. Also provides a number of convenience methods for writing tests.


Nested Class Summary
protected  class ImportTestHarness.AppData
           
protected  class ImportTestHarness.Doc
           
protected  class ImportTestHarness.DocMaster
           
protected  class ImportTestHarness.Entity
          Baseclass for test entities.
protected  class ImportTestHarness.Part
           
protected  class ImportTestHarness.PartDescribeLink
           
protected  class ImportTestHarness.PartMaster
           
protected  class ImportTestHarness.PartUsageLink
           
protected  class ImportTestHarness.StepFileContent
          Class representing the content of a STEP file (i.e.
 
Field Summary
private static int _entityNumberCount
           
protected static int TEST_FILE_SIZE
           
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
ImportTestHarness(String name)
           
 
Method Summary
protected  void assertContentExistence(Mastered docMaster, String contentName, int contentSize, boolean exists)
           
protected  Mastered assertDocMasterExistence(String masterNumber, String masterName, boolean exists)
           
protected  WTDocument assertDocVersion(Mastered master, String versionId, String iterationId)
           
protected  WTDocument assertDocVersion(String masterName, String masterNumber, String versionId, String iterationId)
           
protected  RevisionControlled assertMasteredVersion(Mastered master, String versionId, String iterationId)
           
protected  void assertPartDescribeLink(RevisionControlled part, RevisionControlled doc)
           
protected  Mastered assertPartMasterExistence(String masterNumber, String masterName, boolean exists)
           
protected  void assertPartUsageLink(RevisionControlled rootPart, Mastered subMaster)
           
protected  WTPart assertPartVersion(Mastered master, String versionId, String iterationId)
           
protected  WTPart assertPartVersion(String masterName, String masterNumber, String versionId, String iterationId)
           
protected  void erradicateObject(Class masterClass, String number, String name)
          Delete all versions of a given master in Windchill.
private  int getNextEntityNumber()
          Provides a sequence of numbers for the '#' codes in a STEP file.
 
Methods inherited from class wt.step.STEPTestCase
assertSTEPTrue, assertSTEPTrue
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, 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
 

Field Detail

TEST_FILE_SIZE

protected static final int TEST_FILE_SIZE
See Also:
Constant Field Values

_entityNumberCount

private static int _entityNumberCount
Constructor Detail

ImportTestHarness

public ImportTestHarness(String name)
Method Detail

erradicateObject

protected void erradicateObject(Class masterClass,
                                String number,
                                String name)
                         throws Exception
Delete all versions of a given master in Windchill.

Throws:
Exception

getNextEntityNumber

private int getNextEntityNumber()
Provides a sequence of numbers for the '#' codes in a STEP file.


assertPartUsageLink

protected void assertPartUsageLink(RevisionControlled rootPart,
                                   Mastered subMaster)
                            throws Exception
Throws:
Exception

assertPartDescribeLink

protected void assertPartDescribeLink(RevisionControlled part,
                                      RevisionControlled doc)
                               throws Exception
Throws:
Exception

assertPartMasterExistence

protected Mastered assertPartMasterExistence(String masterNumber,
                                             String masterName,
                                             boolean exists)
                                      throws Exception
Throws:
Exception

assertDocMasterExistence

protected Mastered assertDocMasterExistence(String masterNumber,
                                            String masterName,
                                            boolean exists)
                                     throws Exception
Throws:
Exception

assertContentExistence

protected void assertContentExistence(Mastered docMaster,
                                      String contentName,
                                      int contentSize,
                                      boolean exists)
                               throws Exception
Throws:
Exception

assertPartVersion

protected WTPart assertPartVersion(String masterName,
                                   String masterNumber,
                                   String versionId,
                                   String iterationId)
                            throws Exception
Throws:
Exception

assertDocVersion

protected WTDocument assertDocVersion(String masterName,
                                      String masterNumber,
                                      String versionId,
                                      String iterationId)
                               throws Exception
Throws:
Exception

assertPartVersion

protected WTPart assertPartVersion(Mastered master,
                                   String versionId,
                                   String iterationId)
                            throws Exception
Throws:
Exception

assertDocVersion

protected WTDocument assertDocVersion(Mastered master,
                                      String versionId,
                                      String iterationId)
                               throws Exception
Throws:
Exception

assertMasteredVersion

protected RevisionControlled assertMasteredVersion(Mastered master,
                                                   String versionId,
                                                   String iterationId)
                                            throws Exception
Throws:
Exception