コード例 #1
0
        public void CreateAuctionService_ShouldNotAccessAuctionVaidatorCurrency(string currency)
        {
            var auction = InstanceHelper.GetAuctionService(null);

            auction.Auction.Currency.Name = currency;
            Assert.ThrowsAny <Exception>(() => auction.Auction.Currency.ValidateObject());
        }
コード例 #2
0
        public void EndAuctionTwoTimes_ShouldEndAuction()
        {
            AuctionService auction = InstanceHelper.GetAuctionService(null);

            auction.EndAuction(auction.Auction.PersonOfferor);

            Assert.True(auction.HadEnded);
            Assert.ThrowsAny <Exception>(() => auction.EndAuction(auction.Auction.PersonOfferor));
        }
コード例 #3
0
        public void EndAuction_ShouldEndAuction()
        {
            AuctionService auction = InstanceHelper.GetAuctionService(null);

            auction.EndAuction(auction.Auction.PersonOfferor);

            Assert.True(auction.HadEnded);
            Assert.False(auction.IsActive);
        }
コード例 #4
0
        public void CreateAuctionService_ShouldHaveNotNullAuction()
        {
            var auction = InstanceHelper.GetAuctionService(null);

            Assert.NotNull(auction.Auction);
        }