Examples of URLMasterPasswordProviderValidator


Examples of org.geoserver.security.password.URLMasterPasswordProvider.URLMasterPasswordProviderValidator

        }
    }

    @Test
    public void testUrlConfig() throws Exception {
        URLMasterPasswordProviderValidator validator =
                new URLMasterPasswordProviderValidator(getSecurityManager());

        URLMasterPasswordProviderConfig config = new URLMasterPasswordProviderConfig();
        config.setName("foo");
        config.setClassName(URLMasterPasswordProvider.class.getCanonicalName());
        try {
            validator.validateAddMasterPasswordProvider(config);
            //getSecurityManager().saveMasterPasswordProviderConfig(config);
            fail();
        }
        catch(URLMasterPasswordProviderException e) {
            assertSecurityException(e, URLMasterPasswordProviderException.URL_REQUIRED);
        }
        config.setURL(new URL("file:ABC"));
        config.setReadOnly(true);
        try {
            validator.validateAddMasterPasswordProvider(config);
            //getSecurityManager().saveMasterPasswordProviderConfig(config);
            fail();
        }
        catch(URLMasterPasswordProviderException e) {
            assertSecurityException(e,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.