public AuctionsTests()
 {
     _sut = AuctionFactory.Create();
     _completeListOfProvices = new List <Provider> {
         _provider1, _provider2, _provider3
     };
     _providers = new AuctionProviders(_completeListOfProvices);
     _sut.AddProvider(_provider1, new CheckWhatInviteStrategy(), new InviteProviderToSecondLastRoundStrategy());
 }
        public void Should_Add_New_Round_With_Two_Providers()
        {
            var providers = new AuctionProviders(new List <Provider> {
                _provider1, _provider2
            });

            _sut.AddProvider(_provider2, new CheckWhatInviteStrategy(), new InviteProviderToSecondLastRoundStrategy());

            _sut.AddRound(providers);

            Assert.Equal(2, _sut.Rounds.All().First().Providers.All().Count());
        }
 public InviteWonProviderInPreviousRoundTests()
 {
     _sut       = new InviteProviderToSecondLastRoundStrategy();
     _provider1 = new Provider {
         Id = 1
     };
     _providerToAdd = new Provider {
         Id = 2
     };
     _mockHasRound = new Mock <IHasRound>();
     _mockHasRound.Setup(x => x.Rounds.All());
     _auctionProviders = new AuctionProviders(new List <Provider> {
         _provider1
     });
     _auction = new Auction();
     _round   = new Round(_auction, _auctionProviders, _auctionProviders);
     _round1  = new Round(_auction, _auctionProviders, _auctionProviders);
 }
        public RoundPattern AddRoud(Auction auction, AuctionProviders providers)
        {
            var newRound = new HasRounds(auction);

            return(newRound.AddRoud(auction, providers));
        }
Example #5
0
        public Round(Auction auction, IProviders providers, AuctionProviders providersToAdd)
        {
            Auction = auction;

            Providers.Add(providersToAdd.All());
        }
Example #6
0
 public void AddRound(AuctionProviders providers) =>
 _roundPattern = _roundPattern.AddRoud(this, providers);
 public RoundPattern AddRoud(Auction auction, AuctionProviders providers)
 {
     _objectWithRouds.Rounds.Add(auction, providers);
     return(this);
 }