Examples of SystemSettingsValidator


Examples of org.rhq.enterprise.server.sync.validators.SystemSettingsValidator

public class SystemSettingsValidatorTest extends JMockTest {

    public void testValidatorCallsSystemManager() {
        final SystemManagerLocal systemManager = context.mock(SystemManagerLocal.class);
       
        SystemSettingsValidator validator = new SystemSettingsValidator(systemManager);
       
        final Properties settings = new Properties();
        settings.put("A", "a");
        settings.put("B", "b");
        SystemSettings importedSettings = new SystemSettings(settings);
       
        context.checking(new Expectations() {
            {
                oneOf(systemManager).validateSystemConfiguration(with(any(Subject.class)), with(settings));
            }
        });
       
        validator.validateExportedEntity(importedSettings);
    }   
View Full Code Here

Examples of org.rhq.enterprise.server.sync.validators.SystemSettingsValidator

    }

    @Override
    public Set<EntityValidator<SystemSettings>> getEntityValidators() {
        HashSet<EntityValidator<SystemSettings>> ret = new HashSet<EntityValidator<SystemSettings>>();
        ret.add(new SystemSettingsValidator());
        ret.add(new MaxCountValidator<SystemSettings>(1));
        return ret;
    }
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.