@@ -30,7 +30,6 @@ import org.sonar.api.notifications.NotificationDispatcherMetadata; | |||
import org.sonar.api.resources.Java; | |||
import org.sonar.core.timemachine.Periods; | |||
import org.sonar.plugins.core.batch.IndexProjectPostJob; | |||
import org.sonar.plugins.core.batch.MavenInitializer; | |||
import org.sonar.plugins.core.charts.DistributionAreaChart; | |||
import org.sonar.plugins.core.charts.DistributionBarChart; | |||
import org.sonar.plugins.core.charts.XradarChart; | |||
@@ -413,9 +412,6 @@ public final class CorePlugin extends SonarPlugin { | |||
UserManagedMetrics.class, | |||
Periods.class, | |||
// maven | |||
MavenInitializer.class, | |||
// languages | |||
Java.class, | |||
@@ -521,15 +517,15 @@ public final class CorePlugin extends SonarPlugin { | |||
// Notify incoming violations on my favourite projects | |||
NewViolationsOnMyFavouriteProject.class, | |||
NotificationDispatcherMetadata.create("NewViolationsOnMyFavouriteProject") | |||
.setProperty(NotificationDispatcherMetadata.GLOBAL_NOTIFICATION, "true"), | |||
.setProperty(NotificationDispatcherMetadata.GLOBAL_NOTIFICATION, String.valueOf(true)), | |||
// Notify alerts on my favourite projects | |||
AlertsOnMyFavouriteProject.class, | |||
NotificationDispatcherMetadata.create("AlertsOnMyFavouriteProject") | |||
.setProperty(NotificationDispatcherMetadata.GLOBAL_NOTIFICATION, "true"), | |||
.setProperty(NotificationDispatcherMetadata.GLOBAL_NOTIFICATION, String.valueOf(true)), | |||
// Notify reviews changes | |||
ChangesInReviewAssignedToMeOrCreatedByMe.class, | |||
NotificationDispatcherMetadata.create("ChangesInReviewAssignedToMeOrCreatedByMe") | |||
.setProperty(NotificationDispatcherMetadata.GLOBAL_NOTIFICATION, "true") | |||
.setProperty(NotificationDispatcherMetadata.PER_PROJECT_NOTIFICATION, "true")); | |||
.setProperty(NotificationDispatcherMetadata.GLOBAL_NOTIFICATION, String.valueOf(true)) | |||
.setProperty(NotificationDispatcherMetadata.PER_PROJECT_NOTIFICATION, String.valueOf(true))); | |||
} | |||
} |
@@ -26,7 +26,6 @@ import com.tinkerpop.blueprints.Edge; | |||
import com.tinkerpop.blueprints.Vertex; | |||
import org.sonar.api.test.CoverageBlock; | |||
import org.sonar.api.test.MutableTestCase; | |||
import org.sonar.api.test.MutableTestPlan; | |||
import org.sonar.api.test.TestPlan; | |||
import org.sonar.api.test.Testable; | |||
import org.sonar.api.test.exception.CoverageAlreadyExistsException; | |||
@@ -98,7 +97,7 @@ public class DefaultTestCase extends BeanVertex implements MutableTestCase { | |||
} | |||
public MutableTestCase setCoverageBlock(Testable testable, List<Integer> lines) { | |||
if (coverageBlock(testable)!=null) { | |||
if (coverageBlock(testable) != null) { | |||
throw new CoverageAlreadyExistsException("The link between " + name() + " and " + testable.component().key() + " already exists"); | |||
} | |||
beanGraph().getUnderlyingGraph().addEdge(null, element(), ((BeanVertex) testable).element(), "covers").setProperty("lines", lines); |
@@ -21,8 +21,6 @@ package org.sonar.api.test; | |||
import org.sonar.api.component.Perspective; | |||
import java.util.List; | |||
public interface TestPlan<T extends TestCase> extends Perspective { | |||
Iterable<T> testCases(); | |||
@@ -0,0 +1,33 @@ | |||
/* | |||
* Sonar, open source software quality management tool. | |||
* Copyright (C) 2008-2012 SonarSource | |||
* mailto:contact AT sonarsource DOT com | |||
* | |||
* Sonar is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | |||
* version 3 of the License, or (at your option) any later version. | |||
* | |||
* Sonar is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
* Lesser General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU Lesser General Public | |||
* License along with Sonar; if not, write to the Free Software | |||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 | |||
*/ | |||
package org.sonar.api.test; | |||
import org.junit.Test; | |||
import static org.fest.assertions.Assertions.assertThat; | |||
public class TestCaseTest { | |||
@Test | |||
public void value_of_status() { | |||
assertThat(TestCase.Status.of("OK")).isEqualTo(TestCase.Status.OK); | |||
assertThat(TestCase.Status.of("OK")).isEqualTo(TestCase.Status.OK); | |||
assertThat(TestCase.Status.of(null)).isNull(); | |||
} | |||
} |