Ejemplo n.º 1
0
        public void RemoveBet_ShouldThrowNullArgumentException_WithNullBet()
        {
            var match = new Logic.Models.Match(this.sport, this.league, this.date.AddDays(5), this.homeTeam, this.visitorTeam);

            Assert.That(
                () => match.RemoveBet(null),
                Throws.ArgumentNullException.With.Message.Contains(string.Format(EngineConstants.ObjectCannotBeNullErrorMessage, "Bet")));
        }
Ejemplo n.º 2
0
        public void RemoveBet_ShouldThrowArgumentException_WhenTryingToRemoveExistingBet()
        {
            var match = new Logic.Models.Match(this.sport, this.league, this.date.AddDays(5), this.homeTeam, this.visitorTeam);

            match.Bets.Add(this.mockedBet);

            Assert.AreEqual(1, match.Bets.Count);

            match.RemoveBet(this.mockedBet);

            Assert.AreEqual(0, match.Bets.Count);
        }