-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCucumberSpringConfiguration.java
More file actions
50 lines (47 loc) · 2.74 KB
/
Copy pathCucumberSpringConfiguration.java
File metadata and controls
50 lines (47 loc) · 2.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package cucumber.functional_tests.config;
import fr.insee.genesis.GenesisApi;
import fr.insee.genesis.infrastructure.repository.ContextualExternalVariableMongoDBRepository;
import fr.insee.genesis.infrastructure.repository.ContextualPreviousVariableMongoDBRepository;
import fr.insee.genesis.infrastructure.repository.DataProcessingContextMongoDBRepository;
import fr.insee.genesis.infrastructure.repository.LastJsonExtractionMongoDBRepository;
import fr.insee.genesis.infrastructure.repository.LunaticJsonMongoDBRepository;
import fr.insee.genesis.infrastructure.repository.LunaticModelMongoDBRepository;
import fr.insee.genesis.infrastructure.repository.QuestionnaireMetadataMongoDBRepository;
import fr.insee.genesis.infrastructure.repository.RundeckExecutionDBRepository;
import fr.insee.genesis.infrastructure.repository.SurveyUnitMongoDBRepository;
import io.cucumber.spring.CucumberContextConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.data.mongodb.autoconfigure.DataMongoAutoConfiguration;
import org.springframework.boot.mongodb.autoconfigure.MongoAutoConfiguration;
import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureTestRestTemplate;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
@CucumberContextConfiguration
@SpringBootTest(classes = GenesisApi.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@ActiveProfiles("test-cucumber")
@EnableAutoConfiguration(exclude = {MongoAutoConfiguration.class, DataMongoAutoConfiguration.class})
@AutoConfigureTestRestTemplate
public class CucumberSpringConfiguration {
@MockitoBean
private MongoTemplate mongoTemplate;
@MockitoBean
private SurveyUnitMongoDBRepository surveyUnitMongoDBRepository;
@MockitoBean
private LunaticJsonMongoDBRepository lunaticJsonMongoDBRepository;
@MockitoBean
private RundeckExecutionDBRepository rundeckExecutionDBRepository;
@MockitoBean
private LunaticModelMongoDBRepository lunaticModelMongoDBRepository;
@MockitoBean
private LastJsonExtractionMongoDBRepository lastJsonExtractionMongoDBRepository;
@MockitoBean
private DataProcessingContextMongoDBRepository dataProcessingContextMongoDBRepository;
@MockitoBean
private ContextualPreviousVariableMongoDBRepository contextualPreviousVariableMongoDBRepository;
@MockitoBean
private ContextualExternalVariableMongoDBRepository contextualExternalVariableMongoDBRepository;
@MockitoBean
private QuestionnaireMetadataMongoDBRepository questionnaireMetadataMongoDBRepository;
}