com.ptc.windchill.uwgm.proesrv.action
Class EpmRenameActionTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
com.ptc.windchill.uwgm.test.util.AbstractUwgmTest
com.ptc.windchill.uwgm.proesrv.action.EpmRenameActionTest
- All Implemented Interfaces:
- junit.framework.Test, com.ptc.windchill.uwgm.test.util.UwgmTestConstants
- public class EpmRenameActionTest
- extends com.ptc.windchill.uwgm.test.util.AbstractUwgmTest
Test class for testing EpmRenameAction.
- setUp() sets up the fixtures for the test viz. the container and the principal
- testEpmRenameAction() creates some standalone documents, changes their names
and/or numbers and/or CAD names and verifies that all the changes have been done
correctly.
- testEpmRenameAssembly() is same as above except that it creates an assembly of
of documents instead of standalone ones.
- testEpmRenameFamily() does the same as above except that it creates a family of
documents instead of an assembly.
Nested classes inherited from class com.ptc.windchill.uwgm.test.util.AbstractUwgmTest |
|
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 |
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 |
principal
private WTPrincipal principal
testProduct
private WTContainer testProduct
log
private static Log log
RENAME_TEST_DOC_NOS
private static final int RENAME_TEST_DOC_NOS
- See Also:
- Constant Field Values
cadNameChangeIndices
private static final int[] cadNameChangeIndices
nameChangeIndices
private static final int[] nameChangeIndices
numberChangeIndices
private static final int[] numberChangeIndices
nameNumberChangeIndices
private static final int[] nameNumberChangeIndices
RENAME_SUFFIX
private static final String RENAME_SUFFIX
- See Also:
- Constant Field Values
EpmRenameActionTest
public EpmRenameActionTest()
EpmRenameActionTest
public EpmRenameActionTest(String methodName)
setUp
protected void setUp()
throws Exception
- Throws:
Exception
testEpmRenameAction
public void testEpmRenameAction()
throws Throwable
- Throws:
Throwable
testEpmRenameAssembly
public void testEpmRenameAssembly()
throws Throwable
- Throws:
Throwable
testEpmRenameFamily
public void testEpmRenameFamily()
throws Throwable
- Throws:
Throwable
createStandaloneDocuments
private com.ptc.windchill.uwgm.test.fixture.WorkspaceDataLoader createStandaloneDocuments()
throws Exception
- Throws:
Exception
createAssemblies
private com.ptc.windchill.uwgm.test.fixture.WorkspaceDataLoader createAssemblies()
throws Exception
- Throws:
Exception
createFamilies
private com.ptc.windchill.uwgm.test.fixture.WorkspaceDataLoader createFamilies()
throws Exception
- Throws:
Exception
performEpmRenameTest
private void performEpmRenameTest(com.ptc.windchill.uwgm.test.fixture.WorkspaceDataLoader wsDataLoader,
String methodName,
boolean canDeleteData)
throws Throwable
- Throws:
Throwable
createNewCadNames
private String[] createNewCadNames(EPMDocument[] testDocs)
createRenameInfos
private RenameInfo[] createRenameInfos(EPMDocument[] testDocs)
createCadNameMap
private WTKeyedMap createCadNameMap(String[] newCadNames,
EPMDocument[] testDocs)
createIdentityInfoMap
private WTKeyedMap createIdentityInfoMap(RenameInfo[] renameInfos,
EPMDocument[] testDocs)
refreshTestDocs
private void refreshTestDocs(EPMDocument[] testDocs)
throws WTException
- Throws:
WTException
checkNewCadNames
private void checkNewCadNames(String[] newCadNames,
EPMDocument[] testDocs)
checkNewIdentities
private void checkNewIdentities(RenameInfo[] renameInfos,
EPMDocument[] testDocs)
getNewValue
private String getNewValue(String oldValue)
suite
public static junit.framework.Test suite()
main
public static void main(String[] args)