import org.sonar.db.organization.OrganizationDbTester;
import org.sonar.db.organization.OrganizationDto;
import org.sonar.db.organization.OrganizationTesting;
+import org.sonar.db.permission.template.PermissionTemplateDbTester;
import org.sonar.db.user.RootFlagAssertions;
import org.sonar.db.user.UserDbTester;
private final UserDbTester userTester;
private final ComponentDbTester componentTester;
private final OrganizationDbTester organizationTester;
+ private final PermissionTemplateDbTester permissionTemplateTester;
private final RootFlagAssertions rootFlagAssertions;
private DbTester(System2 system2, @Nullable String schemaPath) {
this.userTester = new UserDbTester(this);
this.componentTester = new ComponentDbTester(this);
this.organizationTester = new OrganizationDbTester(this);
+ this.permissionTemplateTester = new PermissionTemplateDbTester(this);
this.rootFlagAssertions = new RootFlagAssertions(this);
}
return organizationTester;
}
+ public PermissionTemplateDbTester permissionTemplates() {
+ return permissionTemplateTester;
+ }
+
public RootFlagAssertions rootFlag() {
return rootFlagAssertions;
}
@Rule
public DbTester dbTester = DbTester.create(system2);
- private PermissionTemplateDbTester templateDb = new PermissionTemplateDbTester(dbTester);
+ private PermissionTemplateDbTester templateDb = dbTester.permissionTemplates();
private DbSession session = dbTester.getSession();
private Settings settings = new MapSettings();
private PermissionRepository underTest = new PermissionRepository(dbTester.getDbClient(), settings);
@Rule
public DbTester db = DbTester.create(System2.INSTANCE);
private DbSession session = db.getSession();
- private PermissionTemplateDbTester permissionTemplateDbTester = new PermissionTemplateDbTester(db);
+ private PermissionTemplateDbTester permissionTemplateDbTester = db.permissionTemplates();
private PermissionTemplateDao underTest = db.getDbClient().permissionTemplateDao();
@Test
@Rule
public DbTester db = DbTester.create(system);
private DbSession dbSession = db.getSession();
- private PermissionTemplateDbTester templateDb = new PermissionTemplateDbTester(db);
+ private PermissionTemplateDbTester templateDb = db.permissionTemplates();
private PermissionTemplateDao underTest = new PermissionTemplateDao(system);