Package org.jboss.as.test.integration.ejb.entity.bmp

Examples of org.jboss.as.test.integration.ejb.entity.bmp.BMPLocalHome.findByPrimaryKey()


    @Test
    public void testFindByPrimaryKey() throws Exception {
        DataStore.DATA.clear();
        final BMPLocalHome home = getHome();
        DataStore.DATA.put(1099, "VALUE1099");
        BMPLocalInterface result = home.findByPrimaryKey(1099);
        Assert.assertEquals("VALUE1099", result.getMyField());
    }

    @Test
    public void testSingleResultFinderMethod() throws Exception {
View Full Code Here


    @Test
    public void testRemoveEntityBean() throws Exception {
        DataStore.DATA.clear();
        final BMPLocalHome home = getHome();
        DataStore.DATA.put(56, "Remove");
        BMPLocalInterface result = home.findByPrimaryKey(56);
        Assert.assertEquals("Remove", result.getMyField());
        result.remove();
        Assert.assertFalse(DataStore.DATA.containsKey(56));
        try {
            result.getMyField();
View Full Code Here

    public void testIsIdentical() throws Exception {
        DataStore.DATA.clear();
        final BMPLocalHome home = getHome();
        DataStore.DATA.put(40, "1");
        DataStore.DATA.put(41, "2");
        BMPLocalInterface bean1 = home.findByPrimaryKey(40);
        BMPLocalInterface bean1_2 = home.findByPrimaryKey(40);
        BMPLocalInterface bean2 = home.findByPrimaryKey(41);
        Assert.assertTrue(bean1.isIdentical(bean1_2));
        Assert.assertFalse(bean1.isIdentical(bean2));
    }
View Full Code Here

        DataStore.DATA.clear();
        final BMPLocalHome home = getHome();
        DataStore.DATA.put(40, "1");
        DataStore.DATA.put(41, "2");
        BMPLocalInterface bean1 = home.findByPrimaryKey(40);
        BMPLocalInterface bean1_2 = home.findByPrimaryKey(40);
        BMPLocalInterface bean2 = home.findByPrimaryKey(41);
        Assert.assertTrue(bean1.isIdentical(bean1_2));
        Assert.assertFalse(bean1.isIdentical(bean2));
    }
View Full Code Here

        final BMPLocalHome home = getHome();
        DataStore.DATA.put(40, "1");
        DataStore.DATA.put(41, "2");
        BMPLocalInterface bean1 = home.findByPrimaryKey(40);
        BMPLocalInterface bean1_2 = home.findByPrimaryKey(40);
        BMPLocalInterface bean2 = home.findByPrimaryKey(41);
        Assert.assertTrue(bean1.isIdentical(bean1_2));
        Assert.assertFalse(bean1.isIdentical(bean2));
    }

    @Test
View Full Code Here

    @Test
    public void testGetEJBLocalHome() throws Exception {
        DataStore.DATA.clear();
        final BMPLocalHome home = getHome();
        DataStore.DATA.put(23, "23");
        BMPLocalInterface result = home.findByPrimaryKey(23);
        final BMPLocalHome home2 = (BMPLocalHome) result.getEJBLocalHome();
        Assert.assertEquals(SimpleBMPBean.HOME_METHOD_RETURN, home2.exampleHomeMethod());
    }

    @Test
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.