Package org.apache.openejb.test.object

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


     */
    public void TODO_test02_unsetEntityContext(){
        try{
           
        /* TO DO:  This test needs unique functionality to work */
        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("unsetEntityContext");
       
        assertNotNull("The OperationsPolicy is null", actual );
View Full Code Here


     * </PRE>
     */
    public void test03_ejbCreate(){  
        try{
           
        final 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 );

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

     * </PRE>
     */
    public void test04_ejbPostCreate(){
        try{
           
        final 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 );

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

     * </PRE>
     */
    public void test05_ejbRemove(){  
        try{
           
        final 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 );

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

     * </PRE>
     */
    public void TODO_test07_ejbSelect(){    
        try{
           
        final 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 );

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

     * </PRE>
     */
    public void test08_ejbHome(){
        try{
           
        final 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 );

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

     * </PRE>
     */
    public void TODO_test09_ejbSelectInEntity(){ 
        try{
           
        final 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 );

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

     * </PRE>
     */
    public void test10_ejbActivate(){
        try{
           
        final 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 );
   
        final Object expected = policy;
        final Object actual = ejbObject.getAllowedOperationsReport("ejbActivate");
   
        assertNotNull("The OperationsPolicy is null", actual );
View Full Code Here

     * </PRE>
     */
    public void TODO_test11_ejbPassivate(){
        try{
           
        final 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 );
   
        final Object expected = policy;
        final Object actual = ejbObject.getAllowedOperationsReport("ejbPassivate");
   
        assertNotNull("The OperationsPolicy is null", actual );
View Full Code Here

     * </PRE>
     */
    public void test12_ejbLoad(){
        try{
           
        final 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 );

        final Object expected = policy;
        final Object actual = ejbObject.getAllowedOperationsReport("ejbLoad");
   
        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.