blob: 42dbcc663519b373abe108397136a5c8d935c5bf (
plain)
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
|
package org.openecomp.sdc.be.servlets;
import org.openecomp.sdc.be.auditing.impl.AuditingManager;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.servlets.exception.ComponentExceptionMapper;
import org.openecomp.sdc.be.servlets.exception.DefaultExceptionMapper;
import org.openecomp.sdc.be.servlets.exception.StorageExceptionMapper;
import org.springframework.context.annotation.Bean;
import static org.mockito.Mockito.mock;
public class BaseTestConfig {
@Bean
ComponentsUtils componentsUtils() {return new ComponentsUtils(mock(AuditingManager.class));}
@Bean
DefaultExceptionMapper defaultExceptionMapper() {return new DefaultExceptionMapper();}
@Bean
ComponentExceptionMapper componentExceptionMapper() {
return new ComponentExceptionMapper(componentsUtils());
}
@Bean
StorageExceptionMapper storageExceptionMapper() {
return new StorageExceptionMapper(componentsUtils());
}
}
|