示例#1
0
        public void Test_Auction_Can_Accept_Bid()
        {
            var user = new User()
            {
                UserName = testUserName
            };
            var userRepo = new UsersRepository();

            userRepo.Add(user);
            userRepo.SetLogin(user, true);

            var repo = new AuctionRepository();
            var sut  = new AuctionService(repo, userRepo);

            var auctionId = sut.CreateAuction(testUserName, DateTime.UtcNow.AddDays(1));

            var auction = repo.FindAuctionById(auctionId);
            var myBid   = new Bid {
                amount = 1.75, bidder = "Joe", User = user
            };

            sut.CreateBid(auctionId, 10.0, )
            Assert.True(myBid.amount > auction.HighestBid.amount);
            // public double amount { get; set; }
            // public string bidder { get; set; }
            // public User User { get; set; }
        }