Esempio n. 1
0
 public ResultSrv <bool> BusinessFavorite()
 {
     try
     {
         var output             = new ResultSrv <bool>();
         var businessFavoriteVo = BusinessFavoriteVo.ConcreteBuilder
                                  .SetServiceCallParameters(internalServiceCallVo)
                                  .SetBusinessId(0)
                                  .SetDisFavorite(false)
                                  .Build();
         DealingService.BusinessFavorite(businessFavoriteVo, response => Listener.GetResult(response, out output));
         return(output);
     }
     catch (PodException podException)
     {
         Console.WriteLine(
             $"-- {podException.Code}-an error has occured : {Environment.NewLine}{podException.Message}");
         throw;
     }
     catch (Exception exception)
     {
         Console.WriteLine(exception.Message);
         throw;
     }
 }
Esempio n. 2
0
        public void BusinessFavorite_RequiredParameters()
        {
            var internalServiceCallVo = InternalServiceCallVo.ConcreteBuilder
                                        .SetToken("0469eba2ddf84cb49eff254fe353638d")
                                        .Build();

            var output             = new ResultSrv <bool>();
            var businessFavoriteVo = BusinessFavoriteVo.ConcreteBuilder
                                     .SetServiceCallParameters(internalServiceCallVo)
                                     .SetBusinessId(13059)
                                     .SetDisFavorite(false)
                                     .Build();

            DealingService.BusinessFavorite(businessFavoriteVo,
                                            response => Listener.GetResult(response, out output));
            Assert.False(output.HasError);
        }