Package com.vst.model

Examples of com.vst.model.ObjectType


        assertTrue(objectType != null);
        objectTypeDao.verify();
    }

    public void testSaveObjectType() throws Exception {
        ObjectType objectType = new ObjectType();

        // set expected behavior on dao
        objectTypeDao.expects(once()).method("saveObjectType")
            .with(same(objectType)).isVoid();
View Full Code Here


        objectTypeManager.saveObjectType(objectType);
        objectTypeDao.verify();
    }

    public void testAddAndRemoveObjectType() throws Exception {
        ObjectType objectType = new ObjectType();

        // set required fields

        // set expected behavior on dao
        objectTypeDao.expects(once()).method("saveObjectType")
            .with(same(objectType)).isVoid();
        objectTypeManager.saveObjectType(objectType);
        objectTypeDao.verify();

        // reset expectations
        objectTypeDao.reset();

        objectTypeDao.expects(once()).method("removeObjectType").with(eq(new Long(objectTypeId)));
        objectTypeManager.removeObjectType(objectTypeId);
        objectTypeDao.verify();

        // reset expectations
        objectTypeDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(ObjectType.class, objectType.getObjectTypeId());
        objectTypeDao.expects(once()).method("removeObjectType").isVoid();
        objectTypeDao.expects(once()).method("getObjectType").will(throwException(ex));
        objectTypeManager.removeObjectType(objectTypeId);
        try {
            objectTypeManager.getObjectType(objectTypeId);
View Full Code Here

    /**
     * @see com.vst.dao.ObjectTypeDao#getObjectType(Integer objectTypeId)
     */
    public ObjectType getObjectType(final Integer objectTypeId) {
        ObjectType objectType = (ObjectType) getObject(objectTypeId);
        return objectType;
    }
View Full Code Here

TOP

Related Classes of com.vst.model.ObjectType

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.