import java.util.Date;
+import static org.fest.assertions.Assertions.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyListOf;
import static org.mockito.Mockito.mock;
verify(issueDao).selectNonClosedIssuesByModule(1);
verify(stack).setIssues(anyListOf(IssueDto.class), any(Date.class));
}
+
+ @Test
+ public void test_toString() throws Exception {
+ assertThat(sensor.toString()).isEqualTo("InitialOpenIssuesSensor");
+
+ }
}
.copyTable(source, dest, "rules_profiles");
if (projectId != null) {
String snapshotCondition = "islast=" + database.getDialect().getTrueSqlValue() + " and (project_id=" + projectId + " or root_project_id=" + projectId + ")";
- template.copyTable(source, dest, "projects", "(id=" + projectId + " or root_id=" + projectId + ")");
+ template.copyTable(source, dest, "projects", "id in (select project_id from snapshots where " + snapshotCondition + ") or (id=" + projectId + " or root_id=" + projectId + ")");
template.copyTable(source, dest, "snapshots", snapshotCondition);
String forRootModule = "(root_component_id in (select id from projects where id=" + projectId + " and qualifier='TRK'))";