Skip to content

Commit 644ab79

Browse files
authored
Merge pull request DIGI-UW#1759 from AdarshSamani/siteinformation
Site Information Service Integration Test
2 parents 612e143 + 7f3016d commit 644ab79

File tree

4 files changed

+516
-11
lines changed

4 files changed

+516
-11
lines changed

src/test/java/org/openelisglobal/AppTestConfig.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import java.util.List;
99
import lombok.NonNull;
1010
import org.apache.http.impl.client.CloseableHttpClient;
11+
import org.jasypt.util.text.TextEncryptor;
1112
import org.openelisglobal.audittrail.dao.AuditTrailService;
1213
import org.openelisglobal.citystatezip.service.CityStateZipService;
1314
import org.openelisglobal.common.services.IStatusService;
@@ -30,7 +31,6 @@
3031
import org.openelisglobal.reports.service.WHONetReportServiceImpl;
3132
import org.openelisglobal.requester.service.RequesterTypeService;
3233
import org.openelisglobal.sampleqaevent.service.SampleQaEventService;
33-
import org.openelisglobal.siteinformation.service.SiteInformationService;
3434
import org.openelisglobal.testresult.service.TestResultService;
3535
import org.openelisglobal.typeofsample.service.TypeOfSampleService;
3636
import org.openelisglobal.typeofsample.service.TypeOfSampleTestService;
@@ -72,20 +72,28 @@
7272
"org.openelisglobal.systemmodule", "org.openelisglobal.testdictionary", "org.openelisglobal.dictionarycategory",
7373
"org.openelisglobal.observationhistorytype", "org.openelisglobal.statusofsample", "org.openelisglobal.test",
7474
"org.openelisglobal.analyzerimport", "org.openelisglobal.analyzer", "org.openelisglobal.testanalyte",
75-
"org.openelisglobal.observationhistory", "org.openelisglobal.systemusersection" }, excludeFilters = {
75+
"org.openelisglobal.observationhistory", "org.openelisglobal.systemusersection",
76+
"org.openelisglobal.siteinformation", "org.openelisglobal.config" }, excludeFilters = {
7677
@ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openelisglobal.patient.controller.*"),
7778
@ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openelisglobal.organization.controller.*"),
7879
@ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openelisglobal.sample.controller.*"),
7980
@ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openelisglobal.result.controller.*"),
8081
@ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openelisglobal.login.controller.*"),
8182
@ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openelisglobal.program.controller.*"),
83+
@ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openelisglobal.siteinformation.controller.*"),
8284
@ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openelisglobal.config.*"),
8385
@ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openelisglobal.fhir.*"),
8486
@ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openelisglobal.*.fhir.*"),
8587
@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = WHONetReportServiceImpl.class) })
8688
@EnableWebMvc
8789
public class AppTestConfig implements WebMvcConfigurer {
8890

91+
@Bean
92+
@Profile("test")
93+
public TextEncryptor textEncryptor() {
94+
return mock(TextEncryptor.class);
95+
}
96+
8997
@Bean()
9098
@Profile("test")
9199
public PluginAnalyzerService pluginAnalyzerService() {
@@ -236,12 +244,6 @@ public Versioning versioning() {
236244
return mock(Versioning.class);
237245
}
238246

239-
@Bean()
240-
@Profile("test")
241-
public SiteInformationService siteInformationService() {
242-
return mock(SiteInformationService.class);
243-
}
244-
245247
@Bean
246248
@Profile("test")
247249
public PasswordEncoder passwordEncoder() {
@@ -296,4 +298,4 @@ public void configureMessageConverters(@NonNull List<HttpMessageConverter<?>> co
296298
converters.add(jsonConverter());
297299
}
298300

299-
}
301+
}

0 commit comments

Comments
 (0)