Package org.springframework.security

Examples of org.springframework.security.SpringSecurityException


        try {
            executeGetCoverageKvp(raw);
            fail("This should have failed with a security exception");
        } catch (Throwable e) {
            // make sure we are dealing with some security exception
            SpringSecurityException se = null;
            while(e.getCause() != null && e.getCause() != e) {
                e = e.getCause();
                if(e instanceof SpringSecurityException) {
                    se = (SpringSecurityException) e;
                }
            }
           
            if(e == null) {
                fail("We should have got some sort of SpringSecurityException");
            } else {
                // some mumbling about not having enough privileges
                assertTrue(se.getMessage().contains("World"));
                assertTrue(se.getMessage().contains("privileges"));
            }
           
        }
    }
View Full Code Here

TOP

Related Classes of org.springframework.security.SpringSecurityException

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.