Package org.happyfaces.domain.base

Examples of org.happyfaces.domain.base.IEntity


                return new DummyPersistenceService();
            }
        };
       
        // test new instance of TestEntity is created when objectId is not set.
        IEntity initEntity = backingBean.initEntity();
        Assert.assertNotNull(initEntity);
        Assert.assertTrue(initEntity instanceof TestEntity);
        Assert.assertNull(initEntity.getId());
        backingBean.setObjectId(22L);
       
        //
        initEntity = backingBean.initEntity();
        Assert.assertNotNull(initEntity);
        Assert.assertTrue(initEntity instanceof TestEntity);
        Assert.assertEquals(Long.valueOf(22L), initEntity.getId());
       
        // not exist
        backingBean.setObjectId(23L);
        initEntity = backingBean.initEntity();
        Assert.assertNull(initEntity);
View Full Code Here

TOP

Related Classes of org.happyfaces.domain.base.IEntity

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.