public void AddBet_ShouldThrowNullArgumentException_WithNullBet() { var betLine = new BetLine(this.account, this.lineName, this.stepAmount, this.decreasingStepValue); Assert.That( () => betLine.AddBet(null), Throws.ArgumentNullException.With.Message.Contains(string.Format(EngineConstants.ObjectCannotBeNullErrorMessage, "Bet"))); }
public void AddBet_ShouldThrowArgumentException_WhenTryingToAddSameBetTwice() { var betLine = new BetLine(this.account, this.lineName, this.stepAmount, this.decreasingStepValue); betLine.Bets.Add(this.mockedBet); Assert.That( () => betLine.AddBet(this.mockedBet), Throws.ArgumentException.With.Message.Contains(EngineConstants.SameBetToALineErrorMessage)); }