Package org.apache.openejb.test.object

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


     * </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 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 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 test01_setSessionContext(){        
        try{
            final OperationsPolicy policy = new OperationsPolicy();
            policy.allow( policy.Context_getEJBHome );
            policy.allow( policy.Context_lookup );
            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

     * ______________________|__________________________________________________
     * </PRE>
     */
    public void test02_ejbCreate(){            
        try{
            final OperationsPolicy policy = new OperationsPolicy();
            policy.allow( policy.Context_getEJBHome );
            policy.allow( policy.Context_getEJBObject );
            policy.allow( policy.Context_getUserTransaction );
            policy.allow( policy.Context_getTimerService );
            policy.allow( policy.Context_lookup );
            policy.allow( policy.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( policy.Context_getEJBHome );
            policy.allow( policy.Context_getEJBObject );
            policy.allow( policy.Context_getUserTransaction );
            policy.allow( policy.Context_getTimerService );
            policy.allow( policy.Context_lookup );
            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_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.Context_getTimerService );
            policy.allow( policy.Context_lookup );
            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

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

            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.Context_getTimerService );
            policy.allow( policy.Context_lookup );
            policy.allow( policy.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 test02_ejbCreate(){            
        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("ejbCreate");
       
        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.