public void CreateAuctionService_ShouldNotAccessAuctionVaidatorCurrency(string currency)
        {
            var auction = InstanceHelper.GetAuctionService(null);

            auction.Auction.Currency.Name = currency;
            Assert.ThrowsAny <Exception>(() => auction.Auction.Currency.ValidateObject());
        }
        public void CreatePersonService_ShouldThrowInvalidAuctionPhone(string phone)
        {
            var personOfferorService = InstanceHelper.GetPersonOfferorService(null);

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

            auction.EndAuction(auction.Auction.PersonOfferor);

            Assert.True(auction.HadEnded);
            Assert.False(auction.IsActive);
        }
        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);
        }
        public void CreatePersonOfferrorService_ShouldInstantiatePersonOfferorService()
        {
            var personOfferorService = InstanceHelper.GetPersonOfferorService(null);

            Assert.NotNull(personOfferorService);
        }
        public void CreateAuctionService_ShouldHaveNotNullAuction()
        {
            var auction = InstanceHelper.GetAuctionService(null);

            Assert.NotNull(auction.Auction);
        }