Ejemplo n.º 1
0
        public async Task BuyerProfile_Successfull(int buyerId)
        {
            try
            {
                var result = await buyerRepository.GetBuyerProfile(buyerId);

                Assert.NotNull(result.userName);
            }
            catch (Exception e)
            {
                Assert.Fail(e.Message);
            }
        }
Ejemplo n.º 2
0
        public async Task BuyerProfile_Successfull(int buyerId)
        {
            try
            {
                var result = await buyerRepository.GetBuyerProfile(buyerId);

                var mock = new Mock <IBuyerRepository>();
                mock.Setup(x => x.GetBuyerProfile(buyerId));
                Assert.NotNull(result);
            }
            catch (Exception e)
            {
                Assert.Fail(e.Message);
            }
        }
Ejemplo n.º 3
0
        public async Task <BuyerData> GetBuyerProfile(int buyerId)
        {
            BuyerData buyer = await _buyerRepository.GetBuyerProfile(buyerId);

            if (buyer == null)
            {
                return(null);
            }
            else
            {
                return(buyer);
            }
        }
Ejemplo n.º 4
0
        public async Task <Buyer> GetBuyerProfile(string buyerId)
        {
            Buyer buyer = await _ibuyerRepository.GetBuyerProfile(buyerId);

            if (buyer == null)
            {
                return(null);
            }
            else
            {
                return(buyer);
            }
        }