Skip to content

Commit

Permalink
[MODAUD-174] - Fixed Unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
azizbekxm committed Nov 9, 2023
1 parent 38c6613 commit 11961c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import org.folio.rest.jaxrs.model.AuditDataAcquisitionOrderIdGetSortOrder;
import org.folio.rest.jaxrs.model.AuditDataAcquisitionOrderLineIdGetSortOrder;
import org.folio.rest.jaxrs.model.AuditDataAcquisitionPieceIdGetSortOrder;
import org.folio.rest.jaxrs.model.AuditDataAcquisitionPieceIdUniqueStatusGetSortOrder;
import org.folio.rest.jaxrs.resource.AuditDataAcquisition;
import org.folio.rest.tools.utils.TenantTool;
import org.folio.services.acquisition.OrderAuditEventsService;
Expand All @@ -29,17 +28,16 @@ public class AuditDataAcquisitionImpl implements AuditDataAcquisition {

private static final Logger LOGGER = LogManager.getLogger();

private final OrderAuditEventsService orderAuditEventsService;
private final OrderLineAuditEventsService orderLineAuditEventsService;
private final PieceAuditEventsService pieceAuditEventsService;
@Autowired
private OrderAuditEventsService orderAuditEventsService;

@Autowired
private OrderLineAuditEventsService orderLineAuditEventsService;

@Autowired
public AuditDataAcquisitionImpl(OrderAuditEventsService orderAuditEventsService,
OrderLineAuditEventsService orderLineAuditEventsService,
PieceAuditEventsService pieceAuditEventsService) {
this.orderAuditEventsService = orderAuditEventsService;
this.orderLineAuditEventsService = orderLineAuditEventsService;
this.pieceAuditEventsService = pieceAuditEventsService;
private PieceAuditEventsService pieceAuditEventsService;

public AuditDataAcquisitionImpl() {
SpringContextUtil.autowireDependencies(this, Vertx.currentContext());
}

Expand Down Expand Up @@ -105,15 +103,10 @@ public void getAuditDataAcquisitionPieceById(String pieceId, String sortBy, Audi
});
}

@Override
public void getAuditDataAcquisitionPieceUniqueStatusById(String id, String sortBy, AuditDataAcquisitionPieceIdUniqueStatusGetSortOrder sortOrder, int limit, int offset, Map<String, String> okapiHeaders, Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) {

}

private Response mapExceptionToResponse(Throwable throwable) {
LOGGER.debug("mapExceptionToResponse:: Mapping Exception :{} to Response", throwable.getMessage(), throwable);
return GetAuditDataAcquisitionOrderByIdResponse
.respond500WithApplicationJson(ErrorUtils.buildErrors(GENERIC_ERROR_CODE.getCode(), throwable));
.respond500WithApplicationJson(ErrorUtils.buildErrors(GENERIC_ERROR_CODE.getCode(), throwable));
}
}

35 changes: 0 additions & 35 deletions ramls/acquisition-events.raml
Original file line number Diff line number Diff line change
Expand Up @@ -125,38 +125,3 @@ traits:
example:
strict: false
value: !include raml-util/examples/errors.sample

/piece/{id}/unique-status:
get:
description: Get list of piece events by piece_id
is: [
pageable,
validate
]
queryParameters:
sortBy:
description: "sorting by field: actionDate"
type: string
default: action_date
sortOrder:
description: "sort order: asc or desc"
enum: [asc, desc]
type: string
default: desc
limit:
default: 2147483647
offset:
default: 0
responses:
200:
body:
application/json:
type: piece-audit-event-collection
500:
description: "Internal server error"
body:
application/json:
type: errors
example:
strict: false
value: !include raml-util/examples/errors.sample

0 comments on commit 11961c6

Please sign in to comment.