|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
wt.step.STEPTestCase
wt.step.processor.ExportTest
Test for export functionality. Builds its own test data as necessary.
Field Summary | |
private WTPartConfigSpec |
_defaultConfigSpec
|
private Properties |
_exportScope
|
private File |
_pdmTestFile
|
private static WTDocument |
_testDocument
|
private static WTObject[] |
_testScope
|
private static HashSet |
_testScopeNumbers
|
private static WTPart[] |
_testScopeParts
|
private ExpressSchema |
_wtSchema
|
private File |
_wtTestFile
|
private static boolean |
CONTENT_TESTS_POSSIBLE
|
Fields inherited from class junit.framework.TestCase |
|
Constructor Summary | |
ExportTest(String name)
|
Method Summary | |
private static void |
addTestContent(WTDocument doc,
String docNumber)
Compare actual content files with required and request changes. |
private void |
applyLinkTypes()
Apply knowledge of link types to the Windchill schema data. |
protected void |
assertEntityUnsetAttributes(File stepFile,
String entity,
int expectedCount)
Count the unset attributes in entities of a specific type. |
private static void |
buildTestData()
Build a test structure in Windchill for export validation. |
protected int |
countEntities(File stepFile,
String entity)
Count the number of a specific entity by looking for lines of the form:
#nn= SPECIFIC_ENTITY(...);
|
protected static WTPart |
createPart(String masterNumber)
|
protected static WTPartUsageLink |
createPartUsageLink(WTPart part1,
WTPart part2)
|
protected HashSet |
extractMastersList(File stepFile)
Extract id numbers from part/document master lines like:
#14= W_T_PART_MASTER($,$,$,$,$,$,$,$,$,'ASNA2026HK3-8',$,$,'Bolt',$,$);
|
protected static WTDocument |
findDocument(String masterNumber)
|
protected static WTPart |
findPart(String masterNumber)
|
protected WTPartMaster |
findPartMaster(String masterNumber)
|
protected static WTPartUsageLink |
getPartUsageLink(WTPart part1,
WTPart part2)
|
private static void |
initExampleScope()
Initialise export scopes (collections of parts/documents) for use in test cases. |
private void |
loadWtSchema()
Extracted out loading of windchill_schema file as this takes a long time and is not necessary for all tests. |
void |
setUp()
Setup for each test. |
static junit.framework.Test |
suite()
|
void |
testAssemblyExport()
Test that all items in an AssemblyExportSelection are exported. |
void |
testEntityAttributes()
Test that inherited attributes in the Windchill schema have the correct indices for export in Part21/STEP format. |
void |
testLinkTypes()
Test that Windchill link types are appropriately applied to the schema. |
void |
testScopedExport()
Test that the exported data is limited to the scope of the requested parts (with associated documents) in both the WT schema export file and the converted PDM schema export 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, 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 |
private static final boolean CONTENT_TESTS_POSSIBLE
private ExpressSchema _wtSchema
private File _wtTestFile
private File _pdmTestFile
private static WTObject[] _testScope
private static WTDocument _testDocument
private static WTPart[] _testScopeParts
private static HashSet _testScopeNumbers
private Properties _exportScope
private WTPartConfigSpec _defaultConfigSpec
Constructor Detail |
public ExportTest(String name)
Method Detail |
protected static WTPart findPart(String masterNumber) throws Exception
Exception
protected static WTPart createPart(String masterNumber) throws Exception
Exception
protected WTPartMaster findPartMaster(String masterNumber) throws Exception
Exception
protected static WTPartUsageLink getPartUsageLink(WTPart part1, WTPart part2) throws Exception
Exception
protected static WTPartUsageLink createPartUsageLink(WTPart part1, WTPart part2) throws Exception
Exception
protected static WTDocument findDocument(String masterNumber) throws Exception
Exception
private void loadWtSchema() throws Exception
Exception
private void applyLinkTypes() throws Exception
Exception
public void setUp()
private static void buildTestData() throws Exception
ROOT A B C A1 A2 B1 \ B11 DocA
Exception
private static void addTestContent(WTDocument doc, String docNumber) throws Exception
Exception
private static void initExampleScope() throws Exception
Exception
protected HashSet extractMastersList(File stepFile) throws Exception
#14= W_T_PART_MASTER($,$,$,$,$,$,$,$,$,'ASNA2026HK3-8',$,$,'Bolt',$,$);
Exception
protected int countEntities(File stepFile, String entity) throws Exception
#nn= SPECIFIC_ENTITY(...);
Exception
protected void assertEntityUnsetAttributes(File stepFile, String entity, int expectedCount) throws Exception
#nn= SPECIFIC_ENTITY(...);
Exception
public void testEntityAttributes() throws Exception
Exception
public void testLinkTypes() throws Exception
Exception
public void testScopedExport() throws Exception
Exception
public void testAssemblyExport() throws Exception
Exception
public static final junit.framework.Test suite()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |