コード例 #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 CreatePersonService_ShouldThrowInvalidAuctionPhone(string phone)
        {
            var personOfferorService = InstanceHelper.GetPersonOfferorService(null);

            personOfferorService.Offeror.Person.Phone = phone;
            Assert.ThrowsAny <Exception>(() => personOfferorService.Offeror.Person.ValidateObject());
        }
コード例 #3
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));
        }
コード例 #4
0
        public void EndAuction_ShouldEndAuction()
        {
            AuctionService auction = InstanceHelper.GetAuctionService(null);

            auction.EndAuction(auction.Auction.PersonOfferor);

            Assert.True(auction.HadEnded);
            Assert.False(auction.IsActive);
        }
コード例 #5
0
        public void DidPersonHitMaxListLimit_ShoulNotHitLimit()
        {
            var            personOfferorService = InstanceHelper.GetPersonOfferorService(null);
            var            offeror  = personOfferorService.Offeror;
            List <Auction> auctions = new List <Auction>();

            auctions.Add(InstanceHelper.GetAuction());

            var result = personOfferorService.DidPersonHitMaxListLimit(offeror, auctions);

            Assert.False(result);
        }
コード例 #6
0
        public void CreatePersonOfferrorService_ShouldInstantiatePersonOfferorService()
        {
            var personOfferorService = InstanceHelper.GetPersonOfferorService(null);

            Assert.NotNull(personOfferorService);
        }
コード例 #7
0
        public void CreateAuctionService_ShouldHaveNotNullAuction()
        {
            var auction = InstanceHelper.GetAuctionService(null);

            Assert.NotNull(auction.Auction);
        }