Package org.apache.torque.test.dbobject

Examples of org.apache.torque.test.dbobject.OIntegerFkToPPk


     */
    public void testAddObjectToPrimitiveFkNull() throws Exception
    {
        // prepare
        PIntegerPk pIntegerPk = new PIntegerPk();
        OIntegerFkToPPk oIntegerFkToPPk = new OIntegerFkToPPk();

        // execute
        pIntegerPk.addOIntegerFkToPPk(oIntegerFkToPPk);

        // verify
        assertEquals(1, pIntegerPk.getOIntegerFkToPPks().size());
        assertSame(
                oIntegerFkToPPk,
                pIntegerPk.getOIntegerFkToPPks().get(0));

        assertEquals(new Integer(0), oIntegerFkToPPk.getFk());
        assertSame(pIntegerPk, oIntegerFkToPPk.getPIntegerPk());
    }
View Full Code Here


    public void testAddObjectToPrimitiveFkNonZero() throws Exception
    {
        // prepare
        PIntegerPk pIntegerPk = new PIntegerPk();
        pIntegerPk.setId(4);
        OIntegerFkToPPk oIntegerFkToPPk = new OIntegerFkToPPk();

        // execute
        pIntegerPk.addOIntegerFkToPPk(oIntegerFkToPPk);

        // verify
        assertEquals(1, pIntegerPk.getOIntegerFkToPPks().size());
        assertSame(
                oIntegerFkToPPk,
                pIntegerPk.getOIntegerFkToPPks().get(0));

        assertEquals(new Integer(4), oIntegerFkToPPk.getFk());
        assertSame(pIntegerPk, oIntegerFkToPPk.getPIntegerPk());
    }
View Full Code Here

TOP

Related Classes of org.apache.torque.test.dbobject.OIntegerFkToPPk

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.