Package org.jtalks.jcommune.model.entity

Examples of org.jtalks.jcommune.model.entity.PluginProperty


        assertEquals(actualConfiguration.get(0).getValue(), "102");
    }

    @Test
    public void testApplyConfiguration() throws PluginConfigurationException {
        PluginProperty property = new PluginProperty(ORDER_PROPERTY, PluginProperty.Type.INT, "103");
        QuestionsAndAnswersPlugin plugin = new QuestionsAndAnswersPlugin();
        plugin.applyConfiguration(Arrays.asList(property));

        assertEquals(plugin.getConfiguration().size(), 1);
        assertEquals(plugin.getConfiguration().get(0).getValue(), "103");
View Full Code Here


    }

    @Test
    public void updatePropertiesShouldUpdatePassedProperties() {
        //GIVEN
        PluginProperty property = PersistedObjectsFactory.getDefaultPluginConfigurationProperty();
        String newPropertyName = "New property name";
        property.setName(newPropertyName);
        //WHEN
        pluginConfigurationDao.updateProperties(Arrays.asList(property));
        //THEN
        session.evict(property);
        PluginProperty updatedProperty = (PluginProperty) session.get(PluginProperty.class, property.getId());
        assertEquals(updatedProperty.getName(), newPropertyName, "Property should be updated");
    }
View Full Code Here

    }

    @Test
    public void saveOrUpdateShouldSavePluginConfigurationProperties() {
        PluginConfiguration pluginConfiguration = PersistedObjectsFactory.getDefaultPluginConfiguration();
        PluginProperty property = new PluginProperty("Property", PluginProperty.Type.BOOLEAN, "true");
        List<PluginProperty> properties = Arrays.asList(property);
        pluginConfiguration.setProperties(properties);

        pluginConfigurationDao.saveOrUpdate(pluginConfiguration);
        session.flush();
View Full Code Here

TOP

Related Classes of org.jtalks.jcommune.model.entity.PluginProperty

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.