*/
package org.sonar.plugins.core.dashboards;
-import org.sonar.plugins.core.widgets.FilterWidget;
-
-import org.sonar.api.web.Dashboard.Widget;
-
import org.sonar.api.web.Dashboard;
import org.sonar.api.web.DashboardLayout;
import org.sonar.api.web.DashboardTemplate;
+import org.sonar.plugins.core.widgets.FilterWidget;
/**
* Base class for global dashboard containing a single
.setGlobal(true)
.setLayout(DashboardLayout.ONE_COLUMN);
- Widget filterWidget = dashboard.addWidget("filter", 1)
+ dashboard
+ .addWidget("filter", 1)
.setProperty(FilterWidget.FILTER, getFilterKey());
return dashboard;
public void shouldRemoveCharacteristic() {
Model model = Model.create();
Characteristic efficiency = model.createCharacteristicByName("Efficiency");
- Characteristic usability = model.createCharacteristicByName("Usability");
+ model.createCharacteristicByName("Usability");
assertThat(model.getCharacteristics().size(), is(2));
model.removeCharacteristic(efficiency);
@Test
public void shouldNotFailWhenRemovingUnknownCharacteristic() {
Model model = Model.create();
- Characteristic efficiency = model.createCharacteristicByName("Efficiency");
+ model.createCharacteristicByName("Efficiency");
model.removeCharacteristic(Characteristic.createByKey("foo", "Foo"));
assertThat(model.getCharacteristics().size(), is(1));
}
DashboardDto dashboardDto = task.register("Fake", fakeDashboardTemplate.createDashboard());
- verify(dashboardDao).insert(any(DashboardDto.class));
+ verify(dashboardDao).insert(dashboardDto);
verify(loadedTemplateDao).insert(eq(new LoadedTemplateDto("Fake", LoadedTemplateDto.DASHBOARD_TYPE)));
}