Examples of RuleDto


Examples of org.sonar.core.rule.RuleDto

  }

  @Test
  public void synchronize_after_with_nested() {
    RuleDto rule = RuleTesting.newXooX1();

    // insert db
    dao.insert(dbSession, rule);

    dao.addRuleParam(dbSession, rule, RuleParamDto.createFor(rule).setName("MyParam").setType("STRING").setDefaultValue("test"));
    dbSession.commit();

    // 0. Assert rules are in DB
    assertThat(dao.findAll(dbSession)).hasSize(1);
    assertThat(index.countAll()).isEqualTo(1);

    tester.clearIndexes();
    assertThat(index.countAll()).isEqualTo(0);

    tester.get(Platform.class).executeStartupTasks();
    assertThat(index.countAll()).isEqualTo(1);

    assertThat(index.getByKey(rule.getKey()).param("MyParam").defaultValue()).isEqualTo("test");

  }
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.