package org.onap.appc.data.services.node;
import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
MockDbServiceBuilder() throws SvcLogicException {
dbServiceMock = mock(DGGeneralDBService.class);
-
- doReturn(SvcLogicResource.QueryStatus.SUCCESS)
- .when(dbServiceMock)
- .getConfigFileReferenceByFileTypeNVnfType(any(SvcLogicContext.class), anyString(), anyString());
}
MockDbServiceBuilder getConfigFileReferenceByFileTypeNVnfType(String prefix, String fileType, SvcLogicResource.QueryStatus status) throws SvcLogicException {
return this;
}
+ public MockDbServiceBuilder saveUploadConfig(String prefix, SvcLogicResource.QueryStatus status) throws SvcLogicException {
+ doReturn(status)
+ .when(dbServiceMock)
+ .saveUploadConfig(any(SvcLogicContext.class), eq(prefix));
+
+ return this;
+ }
+
+ public MockDbServiceBuilder getUploadConfigInfo(String prefix, SvcLogicResource.QueryStatus status) throws SvcLogicException {
+ doReturn(status)
+ .when(dbServiceMock)
+ .getUploadConfigInfo(any(SvcLogicContext.class), eq(prefix));
+
+ return this;
+ }
+
+ public MockDbServiceBuilder updateUploadConfig(String prefix, int maxId, SvcLogicResource.QueryStatus status) throws SvcLogicException {
+ doReturn(status)
+ .when(dbServiceMock)
+ .updateUploadConfig(any(SvcLogicContext.class), eq(prefix), eq(maxId));
+
+ return this;
+ }
+
DGGeneralDBService build() {
return dbServiceMock;
}