1 | package edu.ucsb.cs156.happiercows.config; | |
2 | ||
3 | import edu.ucsb.cs156.happiercows.services.wiremock.WiremockService; | |
4 | import lombok.extern.slf4j.Slf4j; | |
5 | import org.springframework.beans.factory.annotation.Autowired; | |
6 | import org.springframework.boot.ApplicationRunner; | |
7 | import org.springframework.context.annotation.Bean; | |
8 | import org.springframework.context.annotation.Configuration; | |
9 | import org.springframework.context.annotation.Profile; | |
10 | ||
11 | @Configuration | |
12 | @Slf4j | |
13 | public class RunnerConfiguration { | |
14 | ||
15 | @Autowired | |
16 | WiremockService wiremockService; | |
17 | ||
18 | /** | |
19 | * When using the wiremock profile, this method will call the code needed to set up the wiremock services | |
20 | */ | |
21 | @Profile("wiremock") | |
22 | @Bean | |
23 | public ApplicationRunner wiremockApplicationRunner() { | |
24 |
1
1. wiremockApplicationRunner : replaced return value with null for edu/ucsb/cs156/happiercows/config/RunnerConfiguration::wiremockApplicationRunner → NO_COVERAGE |
return arg -> { |
25 | log.info("wiremock mode"); | |
26 |
1
1. lambda$wiremockApplicationRunner$0 : removed call to edu/ucsb/cs156/happiercows/services/wiremock/WiremockService::init → NO_COVERAGE |
wiremockService.init(); |
27 | log.info("wiremockApplicationRunner completed"); | |
28 | }; | |
29 | } | |
30 | ||
31 | /** | |
32 | * Hook that can be used to set up any services needed for development | |
33 | */ | |
34 | @Profile("development") | |
35 | @Bean | |
36 | public ApplicationRunner developmentApplicationRunner() { | |
37 |
1
1. developmentApplicationRunner : replaced return value with null for edu/ucsb/cs156/happiercows/config/RunnerConfiguration::developmentApplicationRunner → NO_COVERAGE |
return arg -> { |
38 | log.info("development mode"); | |
39 | log.info("developmentApplicationRunner completed"); | |
40 | }; | |
41 | } | |
42 | } | |
Mutations | ||
24 |
1.1 |
|
26 |
1.1 |
|
37 |
1.1 |