@SuppressWarnings("unchecked") @Test public void getMetrics_should_return_expectedMetrics() { final SmellMetrics sut = new SmellMetrics(); @SuppressWarnings("rawtypes") final List actualMetrics = sut.getMetrics(); final SoftAssertions softly = new SoftAssertions(); softly.assertThat(actualMetrics) .hasSize(EXPECTED_METRICS_COUNT); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_DEBT); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_ABBREVIATIONS_USAGE); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_ANTI_PATTERN); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_BAD_DESIGN); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_BAD_FRAMEWORK_USAGE); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_BAD_LOGGING); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_HOW_COMMENT); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_INDECENT_EXPOSURE); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_MEANINGLESS_COMMENT); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_MIDDLE_MAN); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_MISSING_IMPLEMENTATION); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_MULTIPLE_RESPONSIBILITIES); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_NON_EXCEPTION); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_ODDBALL_SOLUTION); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_OVERCOMPLICATED_ALGORITHM); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_PRIMITIVES_OBSESSION); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_REFUSED_BEQUEST); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_REINVENTED_WHEEL); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_SOLUTION_SPRAWL); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_SPECULATIVE_GENERALITY); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_UNCOMMUNICATIVE_NAME); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_USELESS_TEST); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_WRONG_LOGIC); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_WRONG_LANGUAGE); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_MISSING_DOCUMENTATION); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_MISSING_TEST); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_OTHER); softly.assertThat(actualMetrics) .contains(SmellMetrics.SMELL_COUNT_NON_COMPLIANCE_WITH_STANDARDS); softly.assertAll(); }
@SuppressWarnings("rawtypes") @Override public List<Metric> getMetrics() { return ImmutableList.<Metric> copyOf(SMELL_METRICS); }
SmellMetrics implements Metrics { @SuppressWarnings("rawtypes") @Override public List<Metric> getMetrics() { return ImmutableList.<Metric> copyOf(SMELL_METRICS); } }
SmellMetrics implements Metrics { @SuppressWarnings("rawtypes") @Override public List<Metric> getMetrics() { return ImmutableList.<Metric> copyOf(SMELL_METRICS); }  }
SmellMetrics implements Metrics { @SuppressWarnings("rawtypes") @Override public List<Metric> getMetrics() { return ImmutableList.<Metric> copyOf(SMELL_METRICS); }  @SuppressWarnings("rawtypes") @Override List<Metric> getMetrics(); @CheckForNull static final Metric<Serializable> metricFor(final SmellType type); @CheckForNull static final Metric<Serializable> metricFor(final String metricKey); @CheckForNull static final List<Metric<Serializable>> metrics(); }
SmellMetrics implements Metrics { @SuppressWarnings("rawtypes") @Override public List<Metric> getMetrics() { return ImmutableList.<Metric> copyOf(SMELL_METRICS); }  @SuppressWarnings("rawtypes") @Override List<Metric> getMetrics(); @CheckForNull static final Metric<Serializable> metricFor(final SmellType type); @CheckForNull static final Metric<Serializable> metricFor(final String metricKey); @CheckForNull static final List<Metric<Serializable>> metrics(); static final String DOMAIN; static final Metric<Long> SMELL_DEBT; static final Metric<Integer> SMELL_COUNT; static final Metric<Integer> SMELL_COUNT_WRONG_LOGIC; static final Metric<Integer> SMELL_COUNT_WRONG_LANGUAGE; static final Metric<Integer> SMELL_COUNT_OVERCOMPLICATED_ALGORITHM; static final Metric<Integer> SMELL_COUNT_ANTI_PATTERN; static final Metric<Integer> SMELL_COUNT_BAD_DESIGN; static final Metric<Integer> SMELL_COUNT_USELESS_TEST; static final Metric<Integer> SMELL_COUNT_MEANINGLESS_COMMENT; static final Metric<Integer> SMELL_COUNT_UNCOMMUNICATIVE_NAME; static final Metric<Integer> SMELL_COUNT_SPECULATIVE_GENERALITY; static final Metric<Integer> SMELL_COUNT_ODDBALL_SOLUTION; static final Metric<Integer> SMELL_COUNT_PRIMITIVES_OBSESSION; static final Metric<Integer> SMELL_COUNT_INDECENT_EXPOSURE; static final Metric<Integer> SMELL_COUNT_SOLUTION_SPRAWL; static final Metric<Integer> SMELL_COUNT_MIDDLE_MAN; static final Metric<Integer> SMELL_COUNT_REFUSED_BEQUEST; static final Metric<Integer> SMELL_COUNT_NON_EXCEPTION; static final Metric<Integer> SMELL_COUNT_HOW_COMMENT; static final Metric<Integer> SMELL_COUNT_MISSING_IMPLEMENTATION; static final Metric<Integer> SMELL_COUNT_MULTIPLE_RESPONSIBILITIES; static final Metric<Integer> SMELL_COUNT_ABBREVIATIONS_USAGE; static final Metric<Integer> SMELL_COUNT_BAD_LOGGING; static final Metric<Integer> SMELL_COUNT_REINVENTED_WHEEL; static final Metric<Integer> SMELL_COUNT_BAD_FRAMEWORK_USAGE; static final Metric<Integer> SMELL_COUNT_MISSING_DOCUMENTATION; static final Metric<Integer> SMELL_COUNT_MISSING_TEST; static final Metric<Integer> SMELL_COUNT_OTHER; static final Metric<Integer> SMELL_COUNT_NON_COMPLIANCE_WITH_STANDARDS; }