com.ptc.windchill.uwgm.proesrv.action
Class DeleteNewObjectsActionTest

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

public class DeleteNewObjectsActionTest
extends com.ptc.windchill.uwgm.test.util.AbstractUwgmTest
implements com.ptc.windchill.uwgm.test.util.UwgmTestConstants

Test class for DeleteNewObjectsAction based on JUnit framework. Currently contains the following tests: 1) testDeleteSimpleObjects : Tets if the simple objects are deleted or not 2)testDeleteAssociatedObjects : Tetts if the associated objects are deleted properly or not 3)testDeleteSimpleAssembly : Tetts if the simple assembly objects are deleted or not 4) testDeleteParentObjects : Tests if only the parent objects are deleted properly or not 5) testDeleteChildrenObjects : Tests if only the children objects are deleted properly or not 5) testDeleteFamilyObjects : Tests if family objects are deleted properly or not 6) test1DeleteNestedFamilyObjects : Tests if Family objects of nested are properly deleted from workspac when TopGeneric is selected for DeleteNewObjectsAction 7) test2DeleteNestedFamilyObjects : Tests if Family objects of nested are properly deleted from workspac when only instances are selected for DeleteNewObjectsAction


Nested Class Summary
 
Nested classes inherited from class com.ptc.windchill.uwgm.test.util.AbstractUwgmTest
 
Field Summary
private static Log log
           
private  int ObjectsInWorkspace
           
private  WTPrincipal principal
           
private  EPMDocument[] testDocs
           
private  WTPart[] testParts
           
private  WTContainer testProduct
           
private  EPMWorkspace ws
           
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
DeleteNewObjectsActionTest()
           
DeleteNewObjectsActionTest(String methodName)
           
 
Method Summary
private  void createTestData(int numberOfDocs, int numberOfParts)
           
private  void deleteObjects(EPMDocument epmDoc, WTPart wtPart)
           
static void main(String[] args)
           
protected  void setUp()
           
static junit.framework.Test suite()
           
protected  void tearDown()
          Performs the cleanup after test is run.
 void test1DeleteNestedFamilyObjects()
           
 void test2DeleteNestedFamilyObjects()
           
 void testDeleteAssociatedObjects()
           
 void testDeleteChildrenObjects()
          This test checks if the deletion of child objects is successful or not.
 void testDeleteFamilyObjects()
           
 void testDeleteParentObjects()
           
 void testDeleteSimpleAssembly()
           
 void testDeleteSimpleObjects()
           
 
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, 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

ws

private EPMWorkspace ws

testProduct

private WTContainer testProduct

testParts

private WTPart[] testParts

testDocs

private EPMDocument[] testDocs

principal

private WTPrincipal principal

wsDataLoader

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

ObjectsInWorkspace

private int ObjectsInWorkspace

log

private static Log log
Constructor Detail

DeleteNewObjectsActionTest

public DeleteNewObjectsActionTest()

DeleteNewObjectsActionTest

public DeleteNewObjectsActionTest(String methodName)
Method Detail

setUp

protected void setUp()
              throws Exception
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Performs the cleanup after test is run.

Returns:
void
Throws:
Exception

testDeleteSimpleObjects

public void testDeleteSimpleObjects()
                             throws Exception
Throws:
Exception

testDeleteAssociatedObjects

public void testDeleteAssociatedObjects()
                                 throws Exception
Throws:
Exception

testDeleteSimpleAssembly

public void testDeleteSimpleAssembly()
                              throws Exception
Throws:
Exception

testDeleteParentObjects

public void testDeleteParentObjects()
                             throws Exception
Throws:
Exception

testDeleteChildrenObjects

public void testDeleteChildrenObjects()
                               throws Exception
This test checks if the deletion of child objects is successful or not.

Returns:
void
Throws:
Exception

testDeleteFamilyObjects

public void testDeleteFamilyObjects()
                             throws Throwable
Throws:
Throwable

test1DeleteNestedFamilyObjects

public void test1DeleteNestedFamilyObjects()
                                    throws Throwable
Throws:
Throwable

test2DeleteNestedFamilyObjects

public void test2DeleteNestedFamilyObjects()
                                    throws Throwable
Throws:
Throwable

createTestData

private void createTestData(int numberOfDocs,
                            int numberOfParts)
                     throws Exception
Throws:
Exception

suite

public static junit.framework.Test suite()

deleteObjects

private void deleteObjects(EPMDocument epmDoc,
                           WTPart wtPart)
                    throws Exception
Throws:
Exception

main

public static void main(String[] args)