org.alfresco.util
Class RetryingTransactionHelperTestCase.Test

java.lang.Object
  extended by org.alfresco.util.RetryingTransactionHelperTestCase.Test
Enclosing class:
RetryingTransactionHelperTestCase

protected abstract class RetryingTransactionHelperTestCase.Test
extends java.lang.Object

Class containing the code to run as test and the optional code to check the results of the test in a separate transaction if required.


Field Summary
protected  java.util.Map model
          Map containing model values.
 
Constructor Summary
protected RetryingTransactionHelperTestCase.Test()
           
 
Method Summary
protected  org.alfresco.service.cmr.repository.NodeRef getNodeRef(java.lang.String key)
          Helper method to get node reference value from model
protected  java.lang.String getString(java.lang.String key)
          Helper method to get a string value from the model
abstract  java.lang.Object run()
          Body of the test is implemented here.
protected  org.alfresco.service.cmr.repository.NodeRef setNodeRef(java.lang.String key, org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Helper method to set node reference value in model
protected  java.lang.String setString(java.lang.String key, java.lang.String value)
          Helper method to set a string vaule in the model
 void test(java.lang.Object result)
          If you wish to test the results of the above method within a new and separate transaction then implement the tests here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

model

protected java.util.Map model
Map containing model values. Used to pass data between run and test methods.

Constructor Detail

RetryingTransactionHelperTestCase.Test

protected RetryingTransactionHelperTestCase.Test()
Method Detail

setString

protected java.lang.String setString(java.lang.String key,
                                     java.lang.String value)
Helper method to set a string vaule in the model

Parameters:
key - model key
value - model value
Returns:
String model value

getString

protected java.lang.String getString(java.lang.String key)
Helper method to get a string value from the model

Parameters:
key - model key
Returns:
String model value, null if none

setNodeRef

protected org.alfresco.service.cmr.repository.NodeRef setNodeRef(java.lang.String key,
                                                                 org.alfresco.service.cmr.repository.NodeRef nodeRef)
Helper method to set node reference value in model

Parameters:
key - model key
nodeRef - node reference
Returns:
NodeRef node reference

getNodeRef

protected org.alfresco.service.cmr.repository.NodeRef getNodeRef(java.lang.String key)
Helper method to get node reference value from model

Parameters:
key - mode key
Returns:
NodeRef node reference

run

public abstract java.lang.Object run()
                              throws java.lang.Exception
Body of the test is implemented here.

Returns:
A result of the test
Throws:
java.lang.Exception

test

public void test(java.lang.Object result)
          throws java.lang.Exception
If you wish to test the results of the above method within a new and separate transaction then implement the tests here.

Parameters:
result - result of the above method
Throws:
java.lang.Exception


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.