com.ptc.windchill.uwgm.proesrv.action
Class PartRenameActionTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
com.ptc.windchill.uwgm.test.util.AbstractUwgmTest
com.ptc.windchill.uwgm.proesrv.action.PartRenameActionTest
- All Implemented Interfaces:
- junit.framework.Test, com.ptc.windchill.uwgm.test.util.UwgmTestConstants
- public class PartRenameActionTest
- extends com.ptc.windchill.uwgm.test.util.AbstractUwgmTest
Test class for testing PartRenameAction. The setUp() method sets up the fixtures for
the class while the following tests are performed:
- testPartRenameAction(): Creates 3 standalone WTParts, renames 2 and renumbers 2 of
them and finally verifies if the parts have been renamed/renumbered successfully.
- testPartRenameAssembly(): Same as above except that it creates an assembly of
parts with one parent and two children.
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 final Log log
RENAME_TEST_PART_NOS
private static final int RENAME_TEST_PART_NOS
- See Also:
- Constant Field Values
RENAME_SUFFIX
private static final String RENAME_SUFFIX
- See Also:
- Constant Field Values
PartRenameActionTest
public PartRenameActionTest()
PartRenameActionTest
public PartRenameActionTest(String methodName)
setUp
protected void setUp()
throws Exception
- Throws:
Exception
testPartRenameAction
public void testPartRenameAction()
throws Throwable
- Throws:
Throwable
testPartRenameAssembly
public void testPartRenameAssembly()
throws Throwable
- Throws:
Throwable
createStandaloneParts
private com.ptc.windchill.uwgm.test.fixture.WorkspaceDataLoader createStandaloneParts()
throws Exception
- Throws:
Exception
createPartAssemblies
private com.ptc.windchill.uwgm.test.fixture.WorkspaceDataLoader createPartAssemblies()
throws Exception
- Throws:
Exception
performPartRenameTest
private void performPartRenameTest(com.ptc.windchill.uwgm.test.fixture.WorkspaceDataLoader wsDataLoader,
String methodName)
throws Throwable
- Throws:
Throwable
createRenameInfos
private RenameInfo[] createRenameInfos(WTPart[] testParts)
createIdentityInfoMap
private WTKeyedMap createIdentityInfoMap(RenameInfo[] renameInfos,
WTPart[] testParts)
refreshTestParts
private void refreshTestParts(WTPart[] testParts)
throws WTException
- Throws:
WTException
checkNewIdentities
private void checkNewIdentities(RenameInfo[] renameInfos,
WTPart[] testParts)
getNewValue
private String getNewValue(String oldValue)
suite
public static junit.framework.Test suite()
main
public static void main(String[] args)