Package org.sonar.core.properties

Examples of org.sonar.core.properties.PropertiesDao


  @Test
  public void fix_default_profile_if_invalid() throws Exception {
    tester = new ServerTester().addXoo().addComponents(new SimpleProfileDefinition("one", true));
    tester.start();

    PropertiesDao propertiesDao = dbClient().propertiesDao();
    propertiesDao.updateProperties("sonar.profile.xoo", "one", "invalid");
    // -> properties are corrupted. Default profile "invalid" does not exist
    verifyProperty("sonar.profile.xoo", "invalid");

    tester.get(Platform.class).restart();
    // restart must resolve the pb
View Full Code Here


  @Test
  public void do_not_reset_default_profile_if_still_valid() throws Exception {
    tester = new ServerTester().addXoo().addComponents(new SimpleProfileDefinition("one", true), new SimpleProfileDefinition("two", false));
    tester.start();

    PropertiesDao propertiesDao = dbClient().propertiesDao();
    propertiesDao.updateProperties("sonar.profile.xoo", "one", "two");
    verifyProperty("sonar.profile.xoo", "two");

    tester.get(Platform.class).restart();
    // restart must keep "two" as default profile, even if "one" is marked as it
    verifyProperty("sonar.profile.xoo", "two");
View Full Code Here

import static org.mockito.Mockito.*;

public class RenameDeprecatedPropertyKeysTest {
  @Test
  public void should_rename_deprecated_keys() {
    PropertiesDao dao = mock(PropertiesDao.class);
    PropertyDefinitions definitions = new PropertyDefinitions(FakeExtension.class);
    RenameDeprecatedPropertyKeys task = new RenameDeprecatedPropertyKeys(dao, definitions);
    task.start();

    verify(dao).renamePropertyKey("old_key", "new_key");
View Full Code Here

TOP

Related Classes of org.sonar.core.properties.PropertiesDao

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.