public async Task Test_ShipmentGetAllCount_Is_Ok() { try { var amount = await _shipmentService.GetAllCount(new FilterShipment() { CustomerId = 1, StartItem = 0, Amount = 15, }); } catch (Exception ex) { Assert.IsFalse(true); } Assert.IsTrue(true); }
public async Task <int> GetCount(int customerId, int filterType, string language) { var currentUser = await _authenticationService.GetUser(User.Identity.Name); if (currentUser.CustomerId != customerId) { throw new HttpResponseException(HttpStatusCode.InternalServerError, "Provided customer is not assigned to your account"); } language.ConvertLocaleStringToServerLanguage(); var searchFilter = new FilterShipment { CustomerId = currentUser.CustomerId.Value, StartItem = 0, Amount = 10000, TransporterStatus = (ShipmentTransporterStatus)filterType }; var shipmentsCount = await _shipmentService.GetAllCount(searchFilter); return(shipmentsCount); }