Package org.apache.openejb.test.object

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


     * </PRE>
     */
    public void test03_ejbRemove(){
        try{
        /* TO DO:  This test needs unique functionality to work */
        final OperationsPolicy policy = new OperationsPolicy();
        policy.allow( policy.Context_getEJBHome );
        policy.allow( policy.Context_getCallerPrincipal );
        policy.allow( policy.Context_isCallerInRole );
        policy.allow( policy.Context_getEJBObject );
        policy.allow( policy.Context_getUserTransaction );
        policy.allow( policy.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 test04_ejbActivate(){            
        try{
        final OperationsPolicy policy = new OperationsPolicy();
        policy.allow( policy.Context_getEJBHome );
        policy.allow( policy.Context_getCallerPrincipal );
        policy.allow( policy.Context_isCallerInRole );
        policy.allow( policy.Context_getEJBObject );
        policy.allow( policy.Context_getUserTransaction );
        policy.allow( policy.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 test05_ejbPassivate(){            
        try{
        final OperationsPolicy policy = new OperationsPolicy();
        policy.allow( policy.Context_getEJBHome );
        policy.allow( policy.Context_getCallerPrincipal );
        policy.allow( policy.Context_isCallerInRole );
        policy.allow( policy.Context_getEJBObject );
        policy.allow( policy.Context_getUserTransaction );
        policy.allow( policy.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 test06_businessMethod(){
        try{
        final OperationsPolicy policy = new OperationsPolicy();
        policy.allow( policy.Context_getEJBHome );
        policy.allow( policy.Context_getCallerPrincipal );
        policy.allow( policy.Context_isCallerInRole );
        policy.allow( policy.Context_getEJBObject );
        policy.allow( policy.Context_getUserTransaction );
        policy.allow( policy.JNDI_access_to_java_comp_env );
   
        final Object expected = policy;
        final Object actual = ejbObject.getAllowedOperationsReport("businessMethod");
   
        assertNotNull("The OperationsPolicy is null", actual );
View Full Code Here

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

    public void test02_ejbCreate() {
  // The stateless session bean has container managed transactions
  // so, the test Context_getUserTransaction should fail, but,
  // it does not.  Someone should see why it does not fail.
        try {
            final OperationsPolicy policy = new OperationsPolicy();
            policy.allow( OperationsPolicy.Context_getEJBHome );
            policy.allow( OperationsPolicy.Context_getEJBObject );
            policy.allow( OperationsPolicy.Context_getTimerService );
            policy.allow( OperationsPolicy.Context_lookup );
            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 TODO_test03_ejbRemove(){
        try {
            /* TO DO:  This test needs unique functionality to work */
            final OperationsPolicy policy = new OperationsPolicy();
            policy.allow( OperationsPolicy.Context_getEJBHome );
            policy.allow( OperationsPolicy.Context_getEJBObject );
            policy.allow( OperationsPolicy.Context_getTimerService );
            policy.allow( OperationsPolicy.Context_lookup );
            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 test04_businessMethod(){
        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_setRollbackOnly );
            policy.allow( OperationsPolicy.Context_isCallerInRole );
            policy.allow( OperationsPolicy.Context_getEJBObject );
            policy.allow( OperationsPolicy.Context_getTimerService );
            policy.allow( OperationsPolicy.Context_lookup );
            policy.allow( OperationsPolicy.JNDI_access_to_java_comp_env );

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

    public void _test05_ejbTimeout(){
        try {
            ejbObject.scheduleTimer("StatelessAllowedOperationsTests");
            timerSync.waitFor("StatelessAllowedOperationsTests");

            final OperationsPolicy policy = new OperationsPolicy();
            policy.allow( OperationsPolicy.Context_getEJBHome );
            policy.allow( OperationsPolicy.Context_getCallerPrincipal );
            policy.allow( OperationsPolicy.Context_getRollbackOnly );
            policy.allow( OperationsPolicy.Context_setRollbackOnly );
            policy.allow( OperationsPolicy.Context_isCallerInRole );
            policy.allow( OperationsPolicy.Context_getEJBObject );
            policy.allow( OperationsPolicy.Context_getTimerService );
            policy.allow( OperationsPolicy.Context_lookup );
            policy.allow( OperationsPolicy.JNDI_access_to_java_comp_env );

            final Object expected = policy;
            final Object actual = ejbObject.getAllowedOperationsReport("ejbTimeout");

            assertNotNull("The OperationsPolicy is null", actual );
View Full Code Here

     * ______________________|__________________________________________________
     * </PRE>
     */
    public void test01_setSessionContext(){    
        try{
        final OperationsPolicy policy = new OperationsPolicy();
        policy.allow( policy.Context_getEJBHome );
        policy.allow( policy.JNDI_access_to_java_comp_env );
       
        final Object expected = policy;
        final Object actual = ejbObject.getAllowedOperationsReport("setSessionContext");
       
        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.