org.objectweb.jonas.jtests.clients.entity
Class F_EjbqlEC2

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--org.objectweb.jonas.jtests.util.JTestCase
                    |
                    +--org.objectweb.jonas.jtests.clients.entity.A_Ejbql
                          |
                          +--org.objectweb.jonas.jtests.clients.entity.F_EjbqlEC2
All Implemented Interfaces:
junit.framework.Test

public class F_EjbqlEC2
extends A_Ejbql

This is an advanced test suite for home interface on entity bean EJBQL.


Field Summary
protected static CabinHomeRemote cabinhome
           
protected static CruiseHomeRemote cruisehome
           
protected static CustomerHomeRemote customerhome
           
protected static ReservationHomeRemote reservationhome
           
protected static ShipHomeRemote shiphome
           
 
Fields inherited from class org.objectweb.jonas.jtests.util.JTestCase
ictx, isInit, jonasName, msgerror, testtorun, utx
 
Constructor Summary
F_EjbqlEC2(java.lang.String name)
           
 
Method Summary
static void main(java.lang.String[] args)
           
protected  void setUp()
          common setUp routine, used for every test.
static junit.framework.Test suite()
           
 void testAnd1()
          Finding Customer having name 'John Smith85' SELECT OBJECT(c) FROM jt2_Customer c WHERE c.lastName = ?
 void testAnd2()
          Finding Customers having City = Minneapolis and STATE= MN SELECT OBJECT(c) FROM jt2_Customer c WHERE c.homeAddress.city = ?
 void testBetweenDouble()
          Finding ship by tonnage SELECT OBJECT(c) FROM jt2_Ship s WHERE s.tonnage BETWEEN ?
 void testEgalBoolean()
          Finding Customers having GoodCredit SELECT OBJECT(c) FROM jt2_Customer c WHERE c.hasGoodCredit = TRUE
 void testEgalDouble()
          Finding ship by tonnage SELECT OBJECT(c) FROM jt2_Ship s WHERE s.tonnage = ?
 void testEgalInteger()
          Retrieve a collection of all cabins on deck 3 SELECT OBJECT(c) FROM Cabin as c WHERE c.deckLevel = ?
 void testEgalString()
          Finding Customer 'Smith90' SELECT OBJECT(c) FROM jt2_Customer c WHERE c.lastName = 'Smith90'
 void testIn()
          Findng Customers Living in Warm Climates SELECT OBJECT(c) FROM jt2_Customer c WHERE c.homeAddress.state IN ('FL','TX','AZ','CA')
 void testIsEmpty()
          Finding Customers With No Reservations SELECT OBJECT(c) FROM jt2_Customer c WHERE c.reservations IS EMPTY
 void testMemberOfNavigate()
          Finding Customers On Alaska Cruise SELECT OBJECT(c) FROM jt2_Customer cust, Cruise cr WHERE cr = ?
 void testNavigate()
          Finding all city in which the credit card companies that distribute credit cards used by customers The address information of any credit card companies whose cards are not currently used by customers won't be includes in the result SELECT c.creditCard.creditCompany.address.city FROM jt2_Customer As c
 void testwildcards()
          Finding Customer having a name exactly matching 'Joe Star' & Finding Customers having a name like 'Jo S' (no wildcards) & Finding Customers having a name like 'Jo% S%' (with wildcards) Finding Customers having a name like 'Jo% S%' and living in MN SELECT OBJECT(c) FROM jt2_Customer c WHERE c.lastName = ?
 
Methods inherited from class org.objectweb.jonas.jtests.util.JTestCase
debug, getDBEnv, random, sleep, tearDown, testEmpty, unloadBeans, useBeans
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, 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

customerhome

protected static CustomerHomeRemote customerhome

reservationhome

protected static ReservationHomeRemote reservationhome

cruisehome

protected static CruiseHomeRemote cruisehome

shiphome

protected static ShipHomeRemote shiphome

cabinhome

protected static CabinHomeRemote cabinhome
Constructor Detail

F_EjbqlEC2

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

setUp

protected void setUp()
Description copied from class: JTestCase
common setUp routine, used for every test.
Overrides:
setUp in class JTestCase

testAnd1

public void testAnd1()
              throws java.lang.Exception
Finding Customer having name 'John Smith85' SELECT OBJECT(c) FROM jt2_Customer c WHERE c.lastName = ?1 AND c.firstName = ?2

testEgalString

public void testEgalString()
                    throws java.lang.Exception
Finding Customer 'Smith90' SELECT OBJECT(c) FROM jt2_Customer c WHERE c.lastName = 'Smith90'

testEgalBoolean

public void testEgalBoolean()
                     throws java.lang.Exception
Finding Customers having GoodCredit SELECT OBJECT(c) FROM jt2_Customer c WHERE c.hasGoodCredit = TRUE

testAnd2

public void testAnd2()
              throws java.lang.Exception
Finding Customers having City = Minneapolis and STATE= MN SELECT OBJECT(c) FROM jt2_Customer c WHERE c.homeAddress.city = ?1 AND c.homeAddress.state = ?2

testwildcards

public void testwildcards()
                   throws java.lang.Exception
Finding Customer having a name exactly matching 'Joe Star' & Finding Customers having a name like 'Jo S' (no wildcards) & Finding Customers having a name like 'Jo% S%' (with wildcards) Finding Customers having a name like 'Jo% S%' and living in MN SELECT OBJECT(c) FROM jt2_Customer c WHERE c.lastName = ?1 AND c.firstName = ?2 & SELECT OBJECT(c) FROM jt2_Customer c WHERE c.lastName LIKE ?1 AND c.firstName LIKE ?2 & SELECT OBJECT(c) FROM jt2_Customer c WHERE c.lastName LIKE ?1 AND c.firstName LIKE ?2 SELECT OBJECT(c) FROM jt2_Customer c WHERE c.lastName LIKE ?1 AND c.firstName LIKE ?2 AND c.homeAddress.state = ?3

testEgalInteger

public void testEgalInteger()
                     throws java.lang.Exception
Retrieve a collection of all cabins on deck 3 SELECT OBJECT(c) FROM Cabin as c WHERE c.deckLevel = ?1

testIn

public void testIn()
            throws java.lang.Exception
Findng Customers Living in Warm Climates SELECT OBJECT(c) FROM jt2_Customer c WHERE c.homeAddress.state IN ('FL','TX','AZ','CA')

testIsEmpty

public void testIsEmpty()
                 throws java.lang.Exception
Finding Customers With No Reservations SELECT OBJECT(c) FROM jt2_Customer c WHERE c.reservations IS EMPTY

testMemberOfNavigate

public void testMemberOfNavigate()
                          throws java.lang.Exception
Finding Customers On Alaska Cruise SELECT OBJECT(c) FROM jt2_Customer cust, Cruise cr WHERE cr = ?1 AND cust MEMBER OF cr.reservations.customers

testEgalDouble

public void testEgalDouble()
                    throws java.lang.Exception
Finding ship by tonnage SELECT OBJECT(c) FROM jt2_Ship s WHERE s.tonnage = ?1

testBetweenDouble

public void testBetweenDouble()
                       throws java.lang.Exception
Finding ship by tonnage SELECT OBJECT(c) FROM jt2_Ship s WHERE s.tonnage BETWEEN ?1 AND ?2

testNavigate

public void testNavigate()
                  throws java.lang.Exception
Finding all city in which the credit card companies that distribute credit cards used by customers The address information of any credit card companies whose cards are not currently used by customers won't be includes in the result SELECT c.creditCard.creditCompany.address.city FROM jt2_Customer As c

suite

public static junit.framework.Test suite()

main

public static void main(java.lang.String[] args)