Ejemplo n.º 1
0
        public async Task <bool> AssignToTransporters(int shipmentId, int customerId, 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();

            return(await _shipmentService.AssignToTransporters(currentUser.Id, shipmentId));
        }
Ejemplo n.º 2
0
        public async Task Test_AssignTransporter_Is_Ok()
        {
            try
            {
                var a =
                    await _shipmentService.AssignToTransporters(1000, 60);

                ;
                {
                    Assert.IsTrue(true);
                    return;
                }
            }
            catch (Exception ex)
            {
                Assert.IsFalse(true);
            }
        }