Exemplo n.º 1
0
        public void AuctionService_Sale_ReturnsAuctionData()
        {
            var target = new AuctionService();

            var data = target.GetAuctions(new AuctionQueryRequestMessage(AuctionType.Sale)).Result;

            TestContext.WriteLine(JsonConvert.SerializeObject(data));
        }
Exemplo n.º 2
0
        public ActionResult Index()
        {
            var userId  = Guid.Parse(User.Identity.GetUserId());
            var service = new AuctionService(userId);
            var model   = service.GetAuctions();

            return(View(model));
        }
Exemplo n.º 3
0
        public ProductsViewModel()
        {
            var timer = new DispatcherTimer {
                Interval = TimeSpan.FromMilliseconds(1000)
            };

            timer.Tick += (sender, args) =>
            {
                foreach (var item in Products)
                {
                    item.CounterSeconds -= 1;
                }
            };
            timer.Start();

            _productService  = new ProductService();
            _auctionService  = new AuctionService();
            _categoryService = new CategoryService();
            _bidService      = new BidService();
            BidOffset        = _bidService.GetBidOffset().Result;
            Auctions         = new ObservableCollection <Auction>(_auctionService.GetAuctions().Result);

            SelectedAuction = DialogSelectedAuction = Auctions.FirstOrDefault();
        }