Drop the 'Provider' suffix and fix typos in 'Command'.
JIRA: OPNFLWPLUG-1127
Change-Id: I06e3d80920f832c7a03d360908c116e2a18c7794
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
@Command(scope = "ofp", name = "clearStats", description = "Clear openflow statistics.")
@Service
-public class ClearStatsCommandProvider implements Action {
+public class ClearStatsCommand implements Action {
@Reference
Session session;
@Reference
*/
@Command(scope = "ofp", name = "reset-time-counters", description = "Resets events time counters.")
@Service
-public class ResetEventTimesComandProvider implements Action {
+public class ResetEventTimesCommand implements Action {
@Reference
Session session;
*/
@Command(scope = "ofp", name = "reset-session-stats", description = "Resets session statistics counters.")
@Service
-public class ResetSessionStatsComandProvider implements Action {
+public class ResetSessionStatsCommand implements Action {
@Reference
Session session;
*/
@Command(scope = "ofp", name = "show-time-counters", description = "Shows time counts for events.")
@Service
-public class ShowEventTimesComandProvider implements Action {
+public class ShowEventTimesCommand implements Action {
@Reference
Session session;
@Command(scope = "ofp", name = "show-session-stats", description = "Show session statistics.")
@Service
-public class ShowSessionStatsCommandProvider implements Action {
+public class ShowSessionStatsCommand implements Action {
@Reference
Session session;
@Command(scope = "ofp", name = "showStats", description = "Show openflow statistics.")
@Service
-public class ShowStatsCommandProvider implements Action {
+public class ShowStatsCommand implements Action {
@Reference
Session session;
@Reference
* Created by mirehak on 7/29/15.
*/
@ExtendWith(MockitoExtension.class)
-abstract class AbstractKarafTest {
+abstract class AbstractCommandTest {
@Mock
protected Session session;
@Mock
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
/**
- * Test for {@link ClearStatsCommandProvider}.
+ * Test for {@link ClearStatsCommand}.
*/
-class ClearStatsCommandProviderTest extends AbstractKarafTest {
+class ClearStatsCommandTest extends AbstractCommandTest {
private static final Function<String, Boolean> CHECK_NO_ACTIVITY_FUNCTION =
input -> input.endsWith(": no activity detected");
private final MessageIntelligenceAgency messageIntelligenceAgency = new MessageIntelligenceAgencyImpl();
@InjectMocks
- private ClearStatsCommandProvider clearStatsCommand;
+ private ClearStatsCommand clearStatsCommand;
@Override
protected void doBeforeEach() {
}
/**
- * Test for {@link ClearStatsCommandProvider#execute()} when no stats were touched before.
+ * Test for {@link ClearStatsCommand#execute()} when no stats were touched before.
*/
@Test
void clearNoActivity() {
}
/**
- * Test for {@link ClearStatsCommandProvider#execute()} when stats were touched before.
+ * Test for {@link ClearStatsCommand#execute()} when stats were touched before.
*/
@Test
void clearHavingActivity() {
import org.opendaylight.openflowplugin.impl.statistics.ofpspecific.EventsTimeCounter;
/**
- * Test for {@link ResetEventTimesComandProvider}.
+ * Test for {@link ResetEventTimesCommand}.
*/
-class ResetEventTimesComandProviderTest extends AbstractKarafTest {
+class ResetEventTimesCommandTest extends AbstractCommandTest {
private static final Function<String, Boolean> CHECK_NO_ACTIVITY_FUNCTION = String::isEmpty;
@InjectMocks
- private ResetEventTimesComandProvider resetEventTimesCommand;
+ private ResetEventTimesCommand resetEventTimesCommand;
@Override
protected void doBeforeEach() {
}
/**
- * Test for {@link ResetEventTimesComandProvider#execute()} when no stats were touched before.
+ * Test for {@link ResetEventTimesCommand#execute()} when no stats were touched before.
*/
@Test
void resetNoActivity() {
}
/**
- * Test for {@link ResetEventTimesComandProvider#execute()} when stats were touched before.
+ * Test for {@link ResetEventTimesCommand#execute()} when stats were touched before.
*/
@Test
void resetHavingActivity() {
import org.opendaylight.openflowplugin.impl.statistics.ofpspecific.SessionStatistics;
/**
- * Test for {@link ResetSessionStatsComandProvider}.
+ * Test for {@link ResetSessionStatsCommand}.
*/
-class ResetSessionStatsComandProviderTest extends AbstractKarafTest {
+class ResetSessionStatsCommandTest extends AbstractCommandTest {
@InjectMocks
- private ResetSessionStatsComandProvider resetSessionStatsCommand;
+ private ResetSessionStatsCommand resetSessionStatsCommand;
private static final Function<String, Boolean> CHECK_NO_ACTIVITY_FUNCTION = String::isEmpty;
@Override
}
/**
- * Test for {@link ResetSessionStatsComandProvider#execute()} when no stats were touched before.
+ * Test for {@link ResetSessionStatsCommand#execute()} when no stats were touched before.
*/
@Test
void resetNoActivity() {
}
/**
- * Test for {@link ResetSessionStatsComandProvider#execute()} when stats were touched before.
+ * Test for {@link ResetSessionStatsCommand#execute()} when stats were touched before.
*/
@Test
void resetHavingActivity() {
import org.opendaylight.openflowplugin.impl.statistics.ofpspecific.EventsTimeCounter;
/**
- * Test for {@link ShowEventTimesComandProvider}.
+ * Test for {@link ShowEventTimesCommand}.
*/
-class ShowEventTimesComandProviderTest extends AbstractKarafTest {
+class ShowEventTimesCommandTest extends AbstractCommandTest {
private static final Function<String, Boolean> CHECK_NO_ACTIVITY_FUNCTION = String::isEmpty;
@InjectMocks
- private ShowEventTimesComandProvider showEventTimesCommand;
+ private ShowEventTimesCommand showEventTimesCommand;
@Override
protected void doBeforeEach() {
}
/**
- * Test for {@link ShowEventTimesComandProvider#execute()} when no stats were touched before.
+ * Test for {@link ShowEventTimesCommand#execute()} when no stats were touched before.
*/
@Test
void showNoActivity() {
}
/**
- * Test for {@link ShowEventTimesComandProvider#execute()} when stats were touched before.
+ * Test for {@link ShowEventTimesCommand#execute()} when stats were touched before.
*/
@Test
void showHavingActivity() {
import org.opendaylight.openflowplugin.impl.statistics.ofpspecific.SessionStatistics;
/**
- * Test for {@link ShowSessionStatsCommandProvider}.
+ * Test for {@link ShowSessionStatsCommand}.
*/
-class ShowSessionStatsCommandProviderTest extends AbstractKarafTest {
+class ShowSessionStatsCommandTest extends AbstractCommandTest {
private static final Function<String, Boolean> CHECK_NO_ACTIVITY_FUNCTION = String::isEmpty;
@InjectMocks
- private ShowSessionStatsCommandProvider showSessionStatsCommand;
+ private ShowSessionStatsCommand showSessionStatsCommand;
@Override
protected void doBeforeEach() {
}
/**
- * Test for {@link ShowEventTimesComandProvider#execute()} when no stats were touched before.
+ * Test for {@link ShowEventTimesCommand#execute()} when no stats were touched before.
*/
@Test
void showNoActivity() {
}
/**
- * Test for {@link ShowEventTimesComandProvider#execute()} when stats were touched before.
+ * Test for {@link ShowEventTimesCommand#execute()} when stats were touched before.
*/
@Test
void showHavingActivity() {
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
/**
- * Test for {@link ShowStatsCommandProvider}.
+ * Test for {@link ShowStatsCommand}.
*/
-class ShowStatsCommandProviderTest extends AbstractKarafTest {
+class ShowStatsCommandrTest extends AbstractCommandTest {
private final MessageIntelligenceAgency messageIntelligenceAgency = new MessageIntelligenceAgencyImpl();
@InjectMocks
- private ShowStatsCommandProvider showStatsCommand;
+ private ShowStatsCommand showStatsCommand;
private static final Function<String, Boolean> CHECK_NO_ACTIVITY_FUNCTION =
input -> input.endsWith(": no activity detected");
}
/**
- * Test for {@link ShowEventTimesComandProvider#execute()} when no stats were touched before.
+ * Test for {@link ShowEventTimesCommand#execute()} when no stats were touched before.
*/
@Test
void showNoActivity() {
}
/**
- * Test for {@link ShowEventTimesComandProvider#execute()} when stats were touched before.
+ * Test for {@link ShowEventTimesCommand#execute()} when stats were touched before.
*/
@Test
void showHavingActivity() {