com.ptc.windchill.uwgm.common.pdm
Class MasterUtilitiesTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended bycom.ptc.windchill.uwgm.test.util.AbstractUwgmTest
              extended bycom.ptc.windchill.uwgm.common.pdm.MasterUtilitiesTest
All Implemented Interfaces:
junit.framework.Test, com.ptc.windchill.uwgm.test.util.UwgmTestConstants

public class MasterUtilitiesTest
extends com.ptc.windchill.uwgm.test.util.AbstractUwgmTest

Tests static methods from MasterUtilities.


Nested Class Summary
 
Nested classes inherited from class com.ptc.windchill.uwgm.test.util.AbstractUwgmTest
 
Field Summary
private  EPMDocument[] testDocs
           
private  com.ptc.windchill.uwgm.test.fixture.WorkspaceDataLoader wsDataLoader
           
 
Fields inherited from class com.ptc.windchill.uwgm.test.util.AbstractUwgmTest
 
Fields inherited from class junit.framework.TestCase
 
Fields inherited from interface com.ptc.windchill.uwgm.test.util.UwgmTestConstants
UWGM_CLIENT_CACHE_ID, UWGM_CLIENT_NAME, UWGM_CLIENT_VERSION, UWGM_TEST_ASSEMBLY_CHILDREN_NOS, UWGM_TEST_BOOLEAN, UWGM_TEST_DEFAULT_FOLDER_PATH, UWGM_TEST_DEFAULT_LIFECYCLE_NAME, UWGM_TEST_DEFAULT_LIFECYCLE_PROP_NAME, UWGM_TEST_DEFAULT_TEAMTEMPLATE_NAME, UWGM_TEST_DOC_NAME_PREFIX, UWGM_TEST_DOC_NOS, UWGM_TEST_FAMILY_INSTANCE_NOS, UWGM_TEST_FLOAT, UWGM_TEST_FOLDER_NAME_PREFIX, UWGM_TEST_GENERIC_NAME_PREFIX, UWGM_TEST_INSTANCE_NAME_PREFIX, UWGM_TEST_INTEGER, UWGM_TEST_PART_NAME_PREFIX, UWGM_TEST_PART_NOS, UWGM_TEST_PRODUCT1_NAME, UWGM_TEST_PROJECT1_NAME, UWGM_TEST_STRING, UWGM_TEST_WORKSPACE_NAME_PREFIX
 
Constructor Summary
MasterUtilitiesTest()
           
MasterUtilitiesTest(String methodName)
           
 
Method Summary
private  void retrieveMasters()
          Call MasterUtilities.getEpmMastersByCADNames(), verify result.
protected  void setUp()
          Create the test data viz.
 void testMastersRetrieval()
          Test MasterUtilities.getEpmMastersByCADNames() two times: 1.
 
Methods inherited from class com.ptc.windchill.uwgm.test.util.AbstractUwgmTest
getTestResult, reportError, reportFailure, run
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, 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

wsDataLoader

private com.ptc.windchill.uwgm.test.fixture.WorkspaceDataLoader wsDataLoader

testDocs

private EPMDocument[] testDocs
Constructor Detail

MasterUtilitiesTest

public MasterUtilitiesTest()

MasterUtilitiesTest

public MasterUtilitiesTest(String methodName)
Method Detail

setUp

protected void setUp()
              throws Exception
Create the test data viz. the workspace and some test documents and add the latter to the former. The documents are named as UwgmTestDoc0000000001.prt, UwgmTestDoc0000000002.prt and so on.

Throws:
Exception

testMastersRetrieval

public void testMastersRetrieval()
                          throws Exception
Test MasterUtilities.getEpmMastersByCADNames() two times: 1. For new objects just added to the WS; 2. After checking in objects and removing them from WS.

Throws:
Exception

retrieveMasters

private void retrieveMasters()
                      throws WTException
Call MasterUtilities.getEpmMastersByCADNames(), verify result.

Throws:
WTException