Package org.apache.openejb.test.object

Examples of org.apache.openejb.test.object.OperationsPolicy


     * </PRE>
     */
    public void test10_ejbActivate(){
        try{
           
        OperationsPolicy policy = new OperationsPolicy();
        policy.allow( OperationsPolicy.Context_getEJBHome );
        policy.allow( OperationsPolicy.Context_getEJBObject );
        policy.allow( OperationsPolicy.Context_getPrimaryKey );
        policy.allow( OperationsPolicy.JNDI_access_to_java_comp_env );
   
        Object expected = policy;
        Object actual = ejbObject.getAllowedOperationsReport("ejbActivate");
   
        assertNotNull("The OperationsPolicy is null", actual );
View Full Code Here


     * </PRE>
     */
    public void TODO_test11_ejbPassivate(){
        try{
           
        OperationsPolicy policy = new OperationsPolicy();
        policy.allow( OperationsPolicy.Context_getEJBHome );
        policy.allow( OperationsPolicy.Context_getEJBObject );
        policy.allow( OperationsPolicy.Context_getPrimaryKey );
        policy.allow( OperationsPolicy.JNDI_access_to_java_comp_env );
   
        Object expected = policy;
        Object actual = ejbObject.getAllowedOperationsReport("ejbPassivate");
   
        assertNotNull("The OperationsPolicy is null", actual );
View Full Code Here

     * </PRE>
     */
    public void test12_ejbLoad(){
        try{
           
        OperationsPolicy policy = new OperationsPolicy();
        policy.allow( OperationsPolicy.Context_getEJBHome );
        policy.allow( OperationsPolicy.Context_getCallerPrincipal );
        policy.allow( OperationsPolicy.Context_getRollbackOnly );
        policy.allow( OperationsPolicy.Context_isCallerInRole );
//        policy.allow( OperationsPolicy.Context_setRollbackOnly );
        policy.allow( OperationsPolicy.Context_getEJBObject );
        policy.allow( OperationsPolicy.Context_getPrimaryKey );
        policy.allow( OperationsPolicy.JNDI_access_to_java_comp_env );

        Object expected = policy;
        Object actual = ejbObject.getAllowedOperationsReport("ejbLoad");
   
        assertNotNull("The OperationsPolicy is null", actual );
View Full Code Here

     * </PRE>
     */
    public void test13_ejbStore(){
        try{
           
        OperationsPolicy policy = new OperationsPolicy();
        policy.allow( OperationsPolicy.Context_getEJBHome );
        policy.allow( OperationsPolicy.Context_getCallerPrincipal );
        policy.allow( OperationsPolicy.Context_getRollbackOnly );
        policy.allow( OperationsPolicy.Context_isCallerInRole );
//        policy.allow( OperationsPolicy.Context_setRollbackOnly );
        policy.allow( OperationsPolicy.Context_getEJBObject );
        policy.allow( OperationsPolicy.Context_getPrimaryKey );
        policy.allow( OperationsPolicy.JNDI_access_to_java_comp_env );

        Object expected = policy;
        Object actual = ejbObject.getAllowedOperationsReport("ejbStore");
   
        assertNotNull("The OperationsPolicy is null", actual );
View Full Code Here

     * </PRE>
     */
    public void test14_businessMethod(){
        try{
           
        OperationsPolicy policy = new OperationsPolicy();
        policy.allow( OperationsPolicy.Context_getEJBHome );
        policy.allow( OperationsPolicy.Context_getCallerPrincipal );
//        policy.allow( OperationsPolicy.Context_getRollbackOnly );
        policy.allow( OperationsPolicy.Context_isCallerInRole );
//        policy.allow( OperationsPolicy.Context_setRollbackOnly );
        policy.allow( OperationsPolicy.Context_getEJBObject );
        policy.allow( OperationsPolicy.Context_getPrimaryKey );
        policy.allow( OperationsPolicy.JNDI_access_to_java_comp_env );
   
        Object expected = policy;
        Object actual = ejbObject.getAllowedOperationsReport("businessMethod");
   
        assertNotNull("The OperationsPolicy is null", actual );
View Full Code Here

     * </PRE>
     */
    public void test01_setEntityContext(){    
        try{
           
        OperationsPolicy policy = new OperationsPolicy();
        policy.allow(OperationsPolicy.Context_getEJBHome );
        policy.allow(OperationsPolicy.JNDI_access_to_java_comp_env );
       
        Object expected = policy;
        Object actual = ejbObject.getAllowedOperationsReport("setEntityContext");
       
        assertNotNull("The OperationsPolicy is null", actual );
View Full Code Here

     */
    public void TODO_test02_unsetEntityContext(){
        try{
           
        /* TO DO:  This test needs unique functionality to work */
        OperationsPolicy policy = new OperationsPolicy();
        policy.allow( OperationsPolicy.Context_getEJBHome );
        policy.allow( OperationsPolicy.JNDI_access_to_java_comp_env );
       
        Object expected = policy;
        Object actual = ejbObject.getAllowedOperationsReport("unsetEntityContext");
       
        assertNotNull("The OperationsPolicy is null", actual );
View Full Code Here

     * </PRE>
     */
    public void test03_ejbCreate(){  
        try{
           
        OperationsPolicy policy = new OperationsPolicy();
        policy.allow( OperationsPolicy.Context_getEJBHome );
        policy.allow( OperationsPolicy.Context_getCallerPrincipal );
//        policy.allow( OperationsPolicy.Context_getRollbackOnly );
        policy.allow( OperationsPolicy.Context_isCallerInRole );
//        policy.allow( OperationsPolicy.Context_setRollbackOnly );
        policy.allow( OperationsPolicy.JNDI_access_to_java_comp_env );

        Object expected = policy;
        Object actual = ejbObject.getAllowedOperationsReport("ejbCreate");
       
        assertNotNull("The OperationsPolicy is null", actual );
View Full Code Here

     * </PRE>
     */
    public void test04_ejbPostCreate(){
        try{
           
        OperationsPolicy policy = new OperationsPolicy();
        policy.allow( OperationsPolicy.Context_getEJBHome );
        policy.allow( OperationsPolicy.Context_getCallerPrincipal );
//        policy.allow( OperationsPolicy.Context_getRollbackOnly );
        policy.allow( OperationsPolicy.Context_isCallerInRole );
//        policy.allow( OperationsPolicy.Context_setRollbackOnly );
        policy.allow( OperationsPolicy.Context_getEJBObject );
        policy.allow( OperationsPolicy.Context_getPrimaryKey );
        policy.allow( OperationsPolicy.JNDI_access_to_java_comp_env );

        Object expected = policy;
        Object actual = ejbObject.getAllowedOperationsReport("ejbPostCreate");
   
        assertNotNull("The OperationsPolicy is null", actual );
View Full Code Here

     * </PRE>
     */
    public void test01_setEntityContext(){    
        try{
           
        final OperationsPolicy policy = new OperationsPolicy();
        policy.allow(OperationsPolicy.Context_getEJBHome );
        policy.allow(OperationsPolicy.JNDI_access_to_java_comp_env );
       
        final Object expected = policy;
        final Object actual = ejbObject.getAllowedOperationsReport("setEntityContext");
       
        assertNotNull("The OperationsPolicy is null", actual );
View Full Code Here

TOP

Related Classes of org.apache.openejb.test.object.OperationsPolicy

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.