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

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


    }

    @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

Related Classes of org.rhq.enterprise.server.sync.validators.SystemSettingsValidator

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.