com.ptc.windchill.uwgm.proesrv.request
Class UndoCheckoutRequestTest

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.request.AbstractUwgmRequestTest
                  extended bycom.ptc.windchill.uwgm.proesrv.request.UndoCheckoutRequestTest
All Implemented Interfaces:
junit.framework.Test, com.ptc.windchill.uwgm.test.util.UwgmTestConstants

public class UndoCheckoutRequestTest
extends AbstractUwgmRequestTest

Test class for testing UndoCheckoutRequest. - The following tests are available: 1) testUndoCheckoutRequest(): Creates a workspace with some standalone documents and parts in both new and checked out states. Then fires an UndoCheckout request on this workspace and tests whether new objects have been deleted and the checked out ones have been cancel checked out properly or not. 2) testUndoCheckoutAssembly(): Same as above except that instead of standalone objects assemblies of documents and parts are created. 3) testUndoCheckoutFamily(): Same as above except that instead of assemblies, family tables are created.


Nested Class Summary
 
Nested classes inherited from class com.ptc.windchill.uwgm.test.util.AbstractUwgmTest
 
Field Summary
private  boolean createAssemblies
           
private  boolean createFamilies
           
private static Log log
           
private  WTCollection masters
           
private static int NUMBER_OF_CHECKED_IN_DOCUMENTS
           
private static int NUMBER_OF_CHECKED_IN_OBJECTS
           
private static int NUMBER_OF_CHECKED_IN_PARTS
           
private static int NUMBER_OF_CHECKED_OUT_DOCUMENTS
           
private static int NUMBER_OF_CHECKED_OUT_OBJECTS
           
private static int NUMBER_OF_CHECKED_OUT_PARTS
           
private static int NUMBER_OF_DOCUMENTS
           
private static int NUMBER_OF_NEW_DOCUMENTS
           
private static int NUMBER_OF_NEW_OBJECTS
           
private static int NUMBER_OF_NEW_PARTS
           
private static int NUMBER_OF_OBJECTS
           
private static int NUMBER_OF_PARTS
           
private static ObjectIdentifierHelper oidHelper
           
private  com.ptc.windchill.uwgm.test.fixture.WorkspaceRequestDataLoader wsDataLoader
           
 
Fields inherited from class com.ptc.windchill.uwgm.proesrv.request.AbstractUwgmRequestTest
principal, testProduct, testProject
 
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
UndoCheckoutRequestTest()
           
UndoCheckoutRequestTest(String methodName)
           
 
Method Summary
protected  com.ptc.windchill.uwgm.soap.uwgm.Request[] createRequests()
           
private  com.ptc.windchill.uwgm.test.fixture.WorkspaceRequestDataLoader createUndoCheckoutRequestData(boolean createAssemblies, boolean createFamilies)
           
private  void findMasters()
           
static void main(String[] args)
           
protected  void printRequest(com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest uwgmRequest, int cnt)
           
static junit.framework.Test suite()
           
 void testUndoCheckoutAssembly()
           
 void testUndoCheckoutFamily()
           
 void testUndoCheckoutRequest()
           
private  void validateCreatedData(String methodName)
           
protected  void verifySuccessMessage(com.ptc.windchill.uwgm.soap.uwgm.Message msg)
           
private  void verifyWorkspaceDocuments(WTCollection objects, EPMWorkspace workspace)
           
private  void verifyWorkspaceParts(WTCollection objects, EPMWorkspace workspace)
           
 
Methods inherited from class com.ptc.windchill.uwgm.proesrv.request.AbstractUwgmRequestTest
createUwgmIterations, createUwgmIterations, createUwgmIterations, createUwgmWorkspace, createUwgmWorkspace, createUwgmWorkspace, getWorkspaceObjects, getWorkspaceObjectsMap, performUwgmRequestTest, printIterations, printWorkspace, setUp, verifyResponseMessages, verifyTransactionMessages
 
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.WorkspaceRequestDataLoader wsDataLoader

masters

private WTCollection masters

createAssemblies

private boolean createAssemblies

createFamilies

private boolean createFamilies

log

private static Log log

NUMBER_OF_NEW_PARTS

private static final int NUMBER_OF_NEW_PARTS
See Also:
Constant Field Values

NUMBER_OF_NEW_DOCUMENTS

private static final int NUMBER_OF_NEW_DOCUMENTS
See Also:
Constant Field Values

NUMBER_OF_CHECKED_IN_PARTS

private static final int NUMBER_OF_CHECKED_IN_PARTS
See Also:
Constant Field Values

NUMBER_OF_CHECKED_IN_DOCUMENTS

private static final int NUMBER_OF_CHECKED_IN_DOCUMENTS
See Also:
Constant Field Values

NUMBER_OF_CHECKED_OUT_PARTS

private static final int NUMBER_OF_CHECKED_OUT_PARTS
See Also:
Constant Field Values

NUMBER_OF_CHECKED_OUT_DOCUMENTS

private static final int NUMBER_OF_CHECKED_OUT_DOCUMENTS
See Also:
Constant Field Values

NUMBER_OF_NEW_OBJECTS

private static final int NUMBER_OF_NEW_OBJECTS
See Also:
Constant Field Values

NUMBER_OF_CHECKED_IN_OBJECTS

private static final int NUMBER_OF_CHECKED_IN_OBJECTS
See Also:
Constant Field Values

NUMBER_OF_CHECKED_OUT_OBJECTS

private static final int NUMBER_OF_CHECKED_OUT_OBJECTS
See Also:
Constant Field Values

NUMBER_OF_PARTS

private static final int NUMBER_OF_PARTS
See Also:
Constant Field Values

NUMBER_OF_DOCUMENTS

private static final int NUMBER_OF_DOCUMENTS
See Also:
Constant Field Values

NUMBER_OF_OBJECTS

private static final int NUMBER_OF_OBJECTS
See Also:
Constant Field Values

oidHelper

private static final ObjectIdentifierHelper oidHelper
Constructor Detail

UndoCheckoutRequestTest

public UndoCheckoutRequestTest()

UndoCheckoutRequestTest

public UndoCheckoutRequestTest(String methodName)
Method Detail

testUndoCheckoutRequest

public void testUndoCheckoutRequest()
                             throws Throwable
Throws:
Throwable

testUndoCheckoutAssembly

public void testUndoCheckoutAssembly()
                              throws Throwable
Throws:
Throwable

testUndoCheckoutFamily

public void testUndoCheckoutFamily()
                            throws Throwable
Throws:
Throwable

createRequests

protected com.ptc.windchill.uwgm.soap.uwgm.Request[] createRequests()
                                                             throws com.ptc.cipjava.jxthrowable,
                                                                    WTException
Specified by:
createRequests in class AbstractUwgmRequestTest
Throws:
com.ptc.cipjava.jxthrowable
WTException

printRequest

protected void printRequest(com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest uwgmRequest,
                            int cnt)
Overrides:
printRequest in class AbstractUwgmRequestTest

verifySuccessMessage

protected void verifySuccessMessage(com.ptc.windchill.uwgm.soap.uwgm.Message msg)
                             throws WTException
Overrides:
verifySuccessMessage in class AbstractUwgmRequestTest
Throws:
WTException

createUndoCheckoutRequestData

private com.ptc.windchill.uwgm.test.fixture.WorkspaceRequestDataLoader createUndoCheckoutRequestData(boolean createAssemblies,
                                                                                                     boolean createFamilies)
                                                                                              throws Exception
Throws:
Exception

validateCreatedData

private void validateCreatedData(String methodName)
                          throws Throwable
Throws:
Throwable

verifyWorkspaceDocuments

private void verifyWorkspaceDocuments(WTCollection objects,
                                      EPMWorkspace workspace)
                               throws WTException
Throws:
WTException

verifyWorkspaceParts

private void verifyWorkspaceParts(WTCollection objects,
                                  EPMWorkspace workspace)
                           throws WTException
Throws:
WTException

findMasters

private void findMasters()
                  throws WTException
Throws:
WTException

suite

public static junit.framework.Test suite()

main

public static void main(String[] args)