Exemple #1
0
        public void RemoveBet_ShouldThrowNullArgumentException_WithNullBet()
        {
            var betLine = new BetLine(this.account, this.lineName, this.stepAmount, this.decreasingStepValue);

            Assert.That(
                () => betLine.RemoveBet(null),
                Throws.ArgumentNullException.With.Message.Contains(string.Format(EngineConstants.ObjectCannotBeNullErrorMessage, "Bet")));
        }
Exemple #2
0
        public void RemoveBet_ShouldThrowArgumentException_WhenTryingToRemoveExistingBet()
        {
            var betLine = new BetLine(this.account, this.lineName, this.stepAmount, this.decreasingStepValue);

            betLine.Bets.Add(this.mockedBet);

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

            betLine.RemoveBet(this.mockedBet);

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