Package org.rhq.enterprise.server.sync.validators

Examples of org.rhq.enterprise.server.sync.validators.DeployedAgentPluginsValidator.validateExportedState()


        validator.initialize(null, null);
       
        validator.setPluginsToValidate(pluginsToValidate);
       
        //this should validate cleanly
        validator.validateExportedState();
       
        //now add 1 plugin to the validated state
        DeployedAgentPluginsValidator.ConsistentPlugin newPlugin = createPlugin("superfluous", "1", "md5_4");
        pluginsToValidate.add(newPlugin);
       
View Full Code Here


        //now add 1 plugin to the validated state
        DeployedAgentPluginsValidator.ConsistentPlugin newPlugin = createPlugin("superfluous", "1", "md5_4");
        pluginsToValidate.add(newPlugin);
       
        try {
            validator.validateExportedState();
            fail("validation should have detected that the current installation has one plugin less.");
        } catch (InconsistentStateException e) {
            //this is expected
        }
       
View Full Code Here

        //ok, remove the new plugin from the "exported state" and put it in the current state
        pluginsToValidate.remove(newPlugin);
        installedPlugins.add(newPlugin);
       
        try {
            validator.validateExportedState();
            fail("validation should have detected that the current installation has one plugin more.");
        } catch (InconsistentStateException e) {
            //ok
        }
       
View Full Code Here

       
        //change the newPlugin to not be equal
        newPlugin.setMd5("md5_different");
       
        try {
            validator.validateExportedState();
            fail("validation should have failed because one of the plugins differs between current and exported states.");
        } catch (InconsistentStateException e) {
            //ok
        }
       
View Full Code Here

       
        newPlugin.setMd5(newPluginCopy.getMd5());
        newPluginCopy.setMd5("md5_different");
       
        try {
            validator.validateExportedState();
            fail("validation should have failed because one of the plugins differs between current and exported states.");
        } catch (InconsistentStateException e) {
            //ok
        }       
    }
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.