com.retek.commons.util
Class RetekTestCase

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended bycom.retek.commons.util.RetekTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
AbstractMessageLibraryTest, AddressTest, AtpTest, BannerChannelApiTestCase, BusinessExceptionTest, CallCenterTest, CashPaymentTest, CatalogRequestExportBatchTest, CheckPaymentTest, CodesTest, CommandFactoryTestCase, CommonsComponentTests, CommonsGuiTests, ContactDayTypeTest, ContainerDeliveryConfirmationManagerTest, ContextOperationTest, CorrespondenceApiTestCase, CountryNonBusinessDateTest, CountryTest, CountryZipCodeRangeTest, CreditCardExpirationDateTest, CreditCardPaymentTest, CreditCardTest, CustomerApiTestCase, CustomerIntegrationApiTestCase, CustomerMainPreferencesHandlerTest, CustomerOrderApiTestCase, CustomerOrderECDDRecalculationTest, CustomerOrderManagerFactoryTest, CustomerOrderServiceLineCopyTest, DailyMessageTest, DaoPersistFilterTest, DemandApiTestCase, DepictionTest, DifferentiatorGroupHeaderTest, DifferentiatorTest, DifferentiatorTypeTest, DirectShipItemSupplierTest, DirectShipReservationDateCalculatorTest, EncryptionManagerTest, EncryptionStrategyTest, EstimatedAtpValuesCalculatorTest, EventApiTestCase, EventManagerFactoryTest, EventManagerTest, EventTest, com.retek.component.internet.test.ExATestCase, ExportStateTest, FailTest, FixedWidthFormatterTest, GeoLocationApiTestCase, GeoLocationManagerFactoryTest, GeoLocationManagerTest, GiftCertificatePaymentTest, HistoryApiTestCase, InternetMediaExportBatchTest, InventoryApiTestCase, InventoryManagerFactoryTest, InventoryQtyBucketTest, InventoryQtyTest, InventoryQuantityMoveTest, ItemApiTestCase, ItemAttributeManagerTest, ItemAttributeScreenTypeTest, ItemAttributeTest, ItemManagerFactoryTest, ItemManagerTest, ItemSupplierQuantityBlockTest, ItemSupplierTest, LdapLoginModuleTest, LocationApiTestCase, LocationManagerFactoryTest, LocationManagerTest, MediaApiTestCase, MediaManagerFactoryTest, MediaManagerTest, MediaReportingUtilityTest, MediaStatusTest, MediaTest, MediaTypeTest, MerchandiseCertificatePaymentTest, MessageApiTestCase, MessageManagerFactoryTest, MessageManagerTest, MoneyOrderPaymentTest, MoneyTest, NoCustomerInformationReturnTest, NumberRangeTest, ObjectUtilsTest, OracleTestCase, OrderPriorityTest, PackReservationReleaseTest, PackReservationTest, PackTest, PaymentApiTestCase, PaymentManagerFactoryTest, PaymentManagerTest, PaymentSettlementManagerTest, PaymentSettlementTransactionContainerTest, PendApiTestCase, PercentTest, PermissionManagerTest, PluggableServiceManagerTest, ProductInformationManagerTest, ProductInformationTest, PromotionApiTestCase, PromptTest, PropertiesLoginModuleTest, PurchaseOrderTest, QuantityTest, RcomAbstractBatchProgramTest, RcomRibDateUtilTest, RcomRibInjectorTest, RcomRibPublisherTest, RcomRibServiceFactoryTest, RcomRmmFsmTest, RcomRmmVersionTest, RDateTest, RDateUtilityTest, RDateUtilsTest, ResaRtlogTransformerBatchTest, ResaServicePluginFactoryTest, ResaTransactionTransformerTest, ReservationReleaseTest, ReservationTest, ReservationWarehouseReleaseTest, ReservationWarehouseReserveTest, RetekLoggerTest, RetekPermissionCollectionTest, RetekPermissionTest, RetekSecurityManagerFactoryTest, RewardCertificatePaymentTest, RListTest, RoleManagerTest, SaeStoreDayTest, SaeStoreTransactionContainerTest, SaeStoreTransactionCounterTest, SaeTransactionTest, SalesAuditExportFileTest, SalesAuditExportTestCase, SalesAuditManagerTest, SeasonCodeTest, SecurityApiTestCase, SecurityPropertiesTest, SecurityUserUpdateBatchTest, SellingItemDepictionTest, SellingItemManagerCopyMediaTest, SellingItemManagerTest, SellingItemTest, SellingListItemTest, SellingListManagerTest, SellingListTest, SellingSkuTest, ShippingApiTestCase, ShippingManagerFactoryTest, ShippingRateTest, ShipRestrictionManagerTest, SkuTest, StopwatchTest, StoredValueCardPaymentTest, StoreTest, StyleTest, SubConceptTest, SupplierApiTestCase, SystemParameterApiTestCase, TaskApiTestCase, TaxApiTestCase, TenderTypeManagerTest, UdaHeaderTest, UdaValueTest, UnitOfMeasureTest, UpdateMediaStatusBatchTest, UserManagerTest, UserTest, VSSupplierInventoryTest, WarehouseSkuAvailabilityTest, WarehouseTest, ZipCodeRangeWarehousePriorityTest

public abstract class RetekTestCase
extends junit.framework.TestCase


Field Summary
static junit.framework.Test BEGIN_PROFILING
           
static junit.framework.Test END_PROFILING
           
 
Constructor Summary
RetekTestCase(java.lang.String name)
           
 
Method Summary
protected  void assertBusinessException(BusinessException businessException, java.lang.String expectedMessageKey, java.lang.String expectedAttributeName)
           
protected  void assertBusinessExceptionAttribute(BusinessException businessException, java.lang.String expectedAttributeName)
           
protected  void assertContainsString(java.lang.String expected, java.lang.String actual)
           
protected  void assertDateEqualsIgnoreTime(RDate date1, RDate date2)
           
protected  void assertDateNotEqualsIgnoreTime(RDate date1, RDate date2)
           
protected  void assertDateTimeEquals(RDate date1, RDate date2)
          Asserts on Date, Hour, and Minute - Seconds are ignored.
protected  void assertEquals(com.retek.commons.domain.core.impl.remote.AbstractDto dto1, com.retek.commons.domain.core.impl.remote.AbstractDto dto2)
          Asserts on all public "getters" and fields in an AbstractDto.
protected  void assertEqualValuesDeep(com.retek.commons.component.impl.Dto expected, com.retek.commons.component.impl.Dto actual)
           
protected  void assertEqualValuesDeep(com.retek.commons.component.impl.Dto expected, com.retek.commons.component.impl.Dto actual, boolean compareVersionAndDirty)
           
protected  void assertEqualValuesDeep(com.retek.commons.component.impl.SecondClassDto expected, com.retek.commons.component.impl.SecondClassDto actual)
           
protected  void assertNotEquals(java.lang.Object notExpected, java.lang.Object actual)
           
protected  void assertNotNullAndEquals(java.lang.Object expected, java.lang.Object actual)
           
static void assertNull(java.lang.Object o)
           
protected  void assertRetekEquals(java.lang.String infoString, java.lang.Object objectOne, java.lang.Object objectTwo)
          Retek custom assertion that handles assertions on RDates, AbstractDtos and Collections.
protected  void assertRibException(java.lang.Class exceptionClass, java.lang.Exception e)
           
protected  void assertSize(int assertCollectionSize, java.util.Collection collection)
           
protected  void assertStateEquals(com.retek.fsm.StateDescriptor expectedStateDescriptor, DistributedObject businessObject)
           
protected  void assertStateEquals(com.retek.fsm.State expectedState, DistributedObject businessObject)
           
protected  void assertStateNotEquals(com.retek.fsm.StateDescriptor expectedStateDescriptor, DistributedObject businessObject)
           
protected  void assertStateNotEquals(com.retek.fsm.State expectedState, DistributedObject businessObject)
           
protected  void assertXmlEquals(java.lang.String expectedXml, java.lang.String xml)
           
protected  void doClassSetUp()
          Deprecated. Not yet working
 void doInitialSetUp()
           
protected  void doPackageSetUp()
          Deprecated. Not yet working
abstract  void doSetUp()
           
abstract  void doTearDown()
           
 com.retek.commons.component.impl.Dto findDto(java.util.Collection dtos, DistributedReference ref)
           
 com.retek.commons.domain.core.impl.remote.AbstractDto findDto(java.util.Collection dtos, java.lang.String dtoId)
           
protected  DistributedContext getContext()
           
protected  DistributedContext getReadBackContext()
           
protected  java.util.Set getReferences(com.retek.commons.component.impl.Dto[] dtos)
           
protected  java.util.Set getReferences(java.util.Set distributedObjects)
           
protected  boolean isOracleTestCase()
           
protected  void resetSystemRDateToBusinessDay()
           
 void run(junit.framework.TestResult result)
           
protected  void runTest()
           
protected  void setSecurityEncryption(boolean securityEncrypt)
           
protected  void setTaxSimulate(boolean taxSimulate)
           
protected  void setUp()
           
protected  void tearDown()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, runBare, 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, 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

BEGIN_PROFILING

public static final junit.framework.Test BEGIN_PROFILING

END_PROFILING

public static final junit.framework.Test END_PROFILING
Constructor Detail

RetekTestCase

public RetekTestCase(java.lang.String name)
Method Detail

doInitialSetUp

public final void doInitialSetUp()
                          throws java.lang.Exception
Throws:
java.lang.Exception

doSetUp

public abstract void doSetUp()
                      throws java.lang.Exception
Throws:
java.lang.Exception

doTearDown

public abstract void doTearDown()
                         throws java.lang.Exception
Throws:
java.lang.Exception

doPackageSetUp

protected void doPackageSetUp()
                       throws java.lang.Exception
Deprecated. Not yet working

Override this method if your TestCase at the package level has data that can be shared accross multiple TestCase(s) within a package.

Throws:
java.lang.Exception

doClassSetUp

protected void doClassSetUp()
                     throws java.lang.Exception
Deprecated. Not yet working

Override this method if your TestCase at the class level has data that can be shared accross multiple testMethod(s) within a class.

Throws:
java.lang.Exception

setUp

protected void setUp()
              throws java.lang.Exception
Throws:
java.lang.Exception

resetSystemRDateToBusinessDay

protected void resetSystemRDateToBusinessDay()
                                      throws SystemException
Throws:
SystemException

setTaxSimulate

protected void setTaxSimulate(boolean taxSimulate)

setSecurityEncryption

protected void setSecurityEncryption(boolean securityEncrypt)

tearDown

protected void tearDown()
                 throws java.lang.Exception
Throws:
java.lang.Exception

run

public final void run(junit.framework.TestResult result)

runTest

protected void runTest()
                throws java.lang.Throwable
Throws:
java.lang.Throwable

findDto

public com.retek.commons.domain.core.impl.remote.AbstractDto findDto(java.util.Collection dtos,
                                                                     java.lang.String dtoId)

findDto

public com.retek.commons.component.impl.Dto findDto(java.util.Collection dtos,
                                                    DistributedReference ref)

getContext

protected DistributedContext getContext()

getReadBackContext

protected DistributedContext getReadBackContext()

assertDateEqualsIgnoreTime

protected void assertDateEqualsIgnoreTime(RDate date1,
                                          RDate date2)

assertDateNotEqualsIgnoreTime

protected void assertDateNotEqualsIgnoreTime(RDate date1,
                                             RDate date2)

assertDateTimeEquals

protected void assertDateTimeEquals(RDate date1,
                                    RDate date2)
Asserts on Date, Hour, and Minute - Seconds are ignored.


assertStateEquals

protected final void assertStateEquals(com.retek.fsm.StateDescriptor expectedStateDescriptor,
                                       DistributedObject businessObject)

assertStateEquals

protected final void assertStateEquals(com.retek.fsm.State expectedState,
                                       DistributedObject businessObject)

assertStateNotEquals

protected final void assertStateNotEquals(com.retek.fsm.StateDescriptor expectedStateDescriptor,
                                          DistributedObject businessObject)

assertStateNotEquals

protected final void assertStateNotEquals(com.retek.fsm.State expectedState,
                                          DistributedObject businessObject)

assertNull

public static void assertNull(java.lang.Object o)

assertNotNullAndEquals

protected void assertNotNullAndEquals(java.lang.Object expected,
                                      java.lang.Object actual)

assertSize

protected void assertSize(int assertCollectionSize,
                          java.util.Collection collection)

assertNotEquals

protected void assertNotEquals(java.lang.Object notExpected,
                               java.lang.Object actual)

assertBusinessException

protected void assertBusinessException(BusinessException businessException,
                                       java.lang.String expectedMessageKey,
                                       java.lang.String expectedAttributeName)

assertBusinessExceptionAttribute

protected void assertBusinessExceptionAttribute(BusinessException businessException,
                                                java.lang.String expectedAttributeName)

assertRibException

protected void assertRibException(java.lang.Class exceptionClass,
                                  java.lang.Exception e)

assertRetekEquals

protected void assertRetekEquals(java.lang.String infoString,
                                 java.lang.Object objectOne,
                                 java.lang.Object objectTwo)
                          throws java.lang.Exception
Retek custom assertion that handles assertions on RDates, AbstractDtos and Collections. Assertion Rules:
-Nested collections within AbstractDtos are not currently supported.
-Time is ignored in the AbstractDto's RDate assertions
This assertion is in a "test" phase, so, use with caution.

Throws:
java.lang.Exception

assertEquals

protected void assertEquals(com.retek.commons.domain.core.impl.remote.AbstractDto dto1,
                            com.retek.commons.domain.core.impl.remote.AbstractDto dto2)
                     throws java.lang.Exception
Asserts on all public "getters" and fields in an AbstractDto. Assertion Rules:
-Nested collections within AbstractDtos are not currently supported.
-Time is ignored in the AbstractDto's RDate assertions
-"dirty" attribute is ignored This assertion is in a "test" phase, so, use with caution.

Throws:
java.lang.Exception

assertEqualValuesDeep

protected void assertEqualValuesDeep(com.retek.commons.component.impl.Dto expected,
                                     com.retek.commons.component.impl.Dto actual)
                              throws java.lang.Exception
Throws:
java.lang.Exception

assertEqualValuesDeep

protected void assertEqualValuesDeep(com.retek.commons.component.impl.Dto expected,
                                     com.retek.commons.component.impl.Dto actual,
                                     boolean compareVersionAndDirty)
                              throws java.lang.Exception
Throws:
java.lang.Exception

assertEqualValuesDeep

protected void assertEqualValuesDeep(com.retek.commons.component.impl.SecondClassDto expected,
                                     com.retek.commons.component.impl.SecondClassDto actual)
                              throws java.lang.Exception
Throws:
java.lang.Exception

assertContainsString

protected void assertContainsString(java.lang.String expected,
                                    java.lang.String actual)

assertXmlEquals

protected void assertXmlEquals(java.lang.String expectedXml,
                               java.lang.String xml)

isOracleTestCase

protected boolean isOracleTestCase()
Returns:
boolean if special behavior is needed when testing for oracle stuff.

getReferences

protected final java.util.Set getReferences(java.util.Set distributedObjects)

getReferences

protected final java.util.Set getReferences(com.retek.commons.component.impl.Dto[] dtos)


Copyright © 2005 Retek Inc. All Rights Reserved. - Generated at Fri, 01/21/2005 14:25