Exemplo n.º 1
0
        public async Task WithdrawalSteamOffer(OfferStatusRequest request)
        {
            var offer = await CreateOfferData(request, false);

            await UpdateItemsTable(null, offer.Items, false);

            var transOffer = await _offerRepoService.FindAsync(request.OfferSend.SteamOffer.Id);

            await _offerRepoService.AddAcceptedTimesptampToOffer(DateTime.Now, transOffer.Id);
        }
Exemplo n.º 2
0
        public async Task UserWithdrawlOfferWasCanceled()
        {
            _offerMinmalInfo.OfferSend.SteamOffer.ItemsToReceive.Clear();
            _offerMinmalInfo.OfferSend.SteamOffer.Id = "12346";

            A.CallTo(() => _fakedOfferTranascrionRepoService.FindAsync("12346"))
            .Returns(new DatabaseModel.OfferTransaction(0, 0, 0, false, "123456", null, 10));
            await _offerService.RemoveCanceledWithdrawalSteamOffer(_offerMinmalInfo);

            A.CallTo(() => _fakedOfferTranascrionRepoService.Remove(10)).MustHaveHappened();
            A.CallTo(() => _fakedItemInOfferTransactionRepoService.Remove(10)).MustHaveHappened();
            A.CallTo(() => _fakedOfferTranascrionRepoService.FindAsync("12346")).MustHaveHappened();
        }