import org.sonar.server.permission.PermissionChange;
import org.sonar.server.permission.PermissionUpdater;
import org.sonar.server.rule.db.RuleDao;
+import org.sonar.server.rule.index.RuleIndexer;
import org.sonar.server.tester.ServerTester;
import org.sonar.server.tester.UserSessionRule;
import org.sonar.server.user.NewUser;
IssueIndex IssueIndex;
DbSession session;
IssueService service;
+ RuleIndexer ruleIndexer;
@Before
public void setUp() {
IssueIndex = tester.get(IssueIndex.class);
session = db.openSession(false);
service = tester.get(IssueService.class);
+ ruleIndexer = tester.get(RuleIndexer.class);
+ ruleIndexer.setEnabled(true);
}
@After
RuleDto rule = RuleTesting.newXooX1();
tester.get(RuleDao.class).insert(session, rule);
session.commit();
+ ruleIndexer.index();
return rule;
}