Class DalTest

  • public class DalTest
    extends OBBaseTest
    Test different parts of the DAL API: OBDal, OBQuery and OBCriteria. Note the test cases assume that they are run in the order defined in this class.
    • Field Detail

      • thrown

        public org.junit.rules.ExpectedException thrown
    • Constructor Detail

      • DalTest

        public DalTest()
    • Method Detail

      • testASaveBooleanValue1

        public void testASaveBooleanValue1()
        Test to assert save false in a null char(1) column - Part I.
      • testBSaveBooleanValue2

        public void testBSaveBooleanValue2()
        Test to assert save false in a null char(1) column - Part II.
      • testCCreateBPGroup

        public void testCCreateBPGroup()
        Test creates a Category, test simple save through OBDal. The new object is removed in a later test.
      • testDRemoveBPGroup

        public void testDRemoveBPGroup()
        Test queries for the Category created in the previous step and removes it.
      • testECheckBPGroupRemoved

        public void testECheckBPGroupRemoved()
        This test checks if the Category was removed in the previous step.
      • testFUpdateCurrencyByUser

        public void testFUpdateCurrencyByUser()
      • testGUpdateCurrencyByAdmin

        public void testGUpdateCurrencyByAdmin()
        Test updates the description of Currency by the admin user.
      • testHToString

        public void testHToString()
        Tests the toString method of the BaseOBObject (BaseOBObject.toString()).
      • testITransaction25PageRead

        public void testITransaction25PageRead()
        Tests a paged read of MaterialTransaction objects and print of the identifier. The identifier of a transaction has been implemented such that it reads all the references (which are non-null) and uses their identifier to create the identifier of the transaction. Also tests sorting on the name of a related entity (in this case #getName().
      • testJTransactionAllPagesTime

        public void testJTransactionAllPagesTime()
        Test reads 500 pages of the MaterialTransaction table and then prints how many milliseconds one page took to retrieve.
      • testKCurrencyPageRead

        public void testKCurrencyPageRead()
        Tests paged read of Currency objects.
      • testLCashBookPageRead

        public void testLCashBookPageRead()
        Tests paged read of CashBook objects.
      • testMCashBookTrigger

        public void testMCashBookTrigger()
        Tests if a database trigger is fired on creation of a CashBook.
      • testNGetPropertyFromColumnName

        public void testNGetPropertyFromColumnName()
      • getInexistentObjShouldBeNull

        public void getInexistentObjShouldBeNull()
      • getInexistentObjByEntityNameShouldBeNull

        public void getInexistentObjByEntityNameShouldBeNull()
      • getInexistentObjShouldBeNullEvenIfItWasProxied

        public void getInexistentObjShouldBeNullEvenIfItWasProxied()
      • getInexistentObjByEntityNameShouldBeNullEvenIfItWasProxied

        public void getInexistentObjByEntityNameShouldBeNullEvenIfItWasProxied()
      • populatingProxyOfInexistentObjShouldFail

        public void populatingProxyOfInexistentObjShouldFail()
      • countInOBCriteriaInitializesOnce

        public void countInOBCriteriaInitializesOnce()
      • multipleInitializeCallsInOBCriteriaShouldThrowAWarning

        public void multipleInitializeCallsInOBCriteriaShouldThrowAWarning()
      • orderByShouldBeAppliedAfterCount

        public void orderByShouldBeAppliedAfterCount()
      • defaultPoolIsClosedAfterCommit

        public void defaultPoolIsClosedAfterCommit()
      • defaultPoolIsClosedAfterRollback

        public void defaultPoolIsClosedAfterRollback()
      • defaultPoolCanBeUsedAfterCommit

        public void defaultPoolCanBeUsedAfterCommit()
      • defaultPoolCanBeUsedAfterRollback

        public void defaultPoolCanBeUsedAfterRollback()
      • readOnlyPoolNotClosedAfterCommitDefaultPool

        public void readOnlyPoolNotClosedAfterCommitDefaultPool()
      • defaultPoolNotClosedAfterCommitReadOnlyPool

        public void defaultPoolNotClosedAfterCommitReadOnlyPool()
      • readOnlyPoolCanBeUsedAfterClosingDefaultPool

        public void readOnlyPoolCanBeUsedAfterClosingDefaultPool()
      • defaultPoolCanBeUsedAfterClosingReadOnlyPool

        public void defaultPoolCanBeUsedAfterClosingReadOnlyPool()
      • readOnlyPoolCanNotInsert

        public void readOnlyPoolCanNotInsert()
      • readOnlyPoolCanNotUpdate

        public void readOnlyPoolCanNotUpdate()
      • readOnlyPoolCanNotDelete

        public void readOnlyPoolCanNotDelete()
      • testOBQueryWithoutAlias

        public void testOBQueryWithoutAlias()
        Test to check that an OBQuery with a select clause can be executed properly without setting an alias for the main entity of the query.
      • testOBQueryWithAlias

        public void testOBQueryWithAlias()
        Test to check that an OBQuery with a select clause can be executed properly by defining an alias for the main entity of the query.
      • canDeleteWithOBQuery

        public void canDeleteWithOBQuery()
        Test to check deletion queries using OBQuery
      • testOBQueryWithLegacyStyleParameters

        public void testOBQueryWithLegacyStyleParameters()
        Test to check that an OBQuery using legacy-style query parameters ('?') can be executed properly.
      • proxyShouldNotBeInitialized

        public void proxyShouldNotBeInitialized()
        Test to check that proxies are not initialized when retrieving their identifier.
      • proxyShouldBeInitialized

        public void proxyShouldBeInitialized()
        Test to check that proxies are initialized when retrieving a property different from the identifier.
      • canRetrieveIdOfNonExistentProxy

        public void canRetrieveIdOfNonExistentProxy()
        Test to check that it is possible to retrieve the identifier of a proxy that references a non-existent record.
      • canUseOBContextParamNotPresentInSession

        public void canUseOBContextParamNotPresentInSession()
        Test to check that it is possible to use OBContext cached objects as the value for OBQuery parameters even if they have not been previously loaded into the session.
      • nullabilityCheckIsDisabled

        public void nullabilityCheckIsDisabled()
        Test to verify that Hibernate's property nullability check is disabled when creating entities through DAL.
      • evictAnEvictedObjectShouldNotFail

        public void evictAnEvictedObjectShouldNotFail()
        Test to verify that evict() does not fail when invoking it with an already evicted BaseOBObject.