Commit d8cf5811 authored by calocedre TAC's avatar calocedre TAC
Browse files

remove useless code

parent bf5199a6
...@@ -7,7 +7,6 @@ import org.junit.jupiter.api.extension.ExtendWith; ...@@ -7,7 +7,6 @@ import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.junit.jupiter.SpringExtension;
...@@ -15,21 +14,16 @@ import fr.gouv.clea.clea.scoring.configuration.exposure.ExposureTimeConfiguratio ...@@ -15,21 +14,16 @@ import fr.gouv.clea.clea.scoring.configuration.exposure.ExposureTimeConfiguratio
import fr.gouv.clea.clea.scoring.configuration.exposure.ExposureTimeConfigurationConverter; import fr.gouv.clea.clea.scoring.configuration.exposure.ExposureTimeConfigurationConverter;
import fr.gouv.clea.clea.scoring.configuration.risk.RiskConfiguration; import fr.gouv.clea.clea.scoring.configuration.risk.RiskConfiguration;
import fr.gouv.clea.clea.scoring.configuration.risk.RiskConfigurationConverter; import fr.gouv.clea.clea.scoring.configuration.risk.RiskConfigurationConverter;
import fr.gouv.clea.clea.scoring.configuration.risk.RiskRule;
@SpringBootTest() @SpringBootTest()
@ExtendWith(SpringExtension.class) @ExtendWith(SpringExtension.class)
@EnableConfigurationProperties(value = {RiskConfiguration.class, ExposureTimeConfiguration.class}) @EnableConfigurationProperties(value = {RiskConfiguration.class, ExposureTimeConfiguration.class})
@ContextConfiguration(classes = {RiskConfigurationConverter.class, ExposureTimeConfigurationConverter.class}) @ContextConfiguration(classes = {RiskConfigurationConverter.class, ExposureTimeConfigurationConverter.class})
@ActiveProfiles("test")
class ScoringRuleTest { class ScoringRuleTest {
@Autowired @Autowired
private RiskConfiguration riskConfiguration; private RiskConfiguration riskConfiguration;
@Autowired
private ExposureTimeConfiguration exposureTimeConfiguration;
@Test @Test
void should_return_the_full_wildcard_rule() { void should_return_the_full_wildcard_rule() {
assertThat(riskConfiguration.getConfigurationFor(2, 1, 1)) assertThat(riskConfiguration.getConfigurationFor(2, 1, 1))
...@@ -72,19 +66,4 @@ class ScoringRuleTest { ...@@ -72,19 +66,4 @@ class ScoringRuleTest {
.isEqualTo(riskConfiguration.getScorings().get(6)); .isEqualTo(riskConfiguration.getScorings().get(6));
} }
private ScoringRule buildRiskRule(int venueType, int venueCategory1, int venueCategory2,
int clusterThresholdBackward, int clusterThresholdForward,
float riskLevelBackward, float riskLevelForward) {
return RiskRule.builder()
.venueType(venueType)
.venueCategory1(venueCategory1)
.venueCategory2(venueCategory2)
.clusterThresholdBackward(clusterThresholdBackward)
.clusterThresholdForward(clusterThresholdForward)
.riskLevelBackward(riskLevelBackward)
.riskLevelForward(riskLevelForward)
.build();
}
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment