Examples of validateExportedState()


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

        //init the validator
        validator.initialize(subject, entityManager);

        //perform the validation
        validator.initializeExportedStateValidation(new ExportReader(rdr));
        validator.validateExportedState();

        return validator;
    }

    private <E, X> String importSingle(Subject subject, Map<String, Configuration> importConfigs, XMLStreamReader rdr)
View Full Code Here

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

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

        //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

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

        //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

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

       
        //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

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

       
        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.