예제 #1
0
 public async Task Test_AssignToOpenMarket_Is_Ok()
 {
     if (await _shipmentService.AssignToOpenMarket(1000, 44))
     {
         Assert.IsTrue(true);
         return;
     }
     Assert.IsFalse(true);
 }
예제 #2
0
        public async Task <bool> AssignToOpenMarket(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.AssignToOpenMarket(currentUser.Id, shipmentId));
        }