public void TakeBet_ValidInput_AddsPrediction() { var betRepoMock = new Mock <IBetRepository>(); var bookie = new BookMaker(betRepoMock.Object); bookie.TakeBet(ValidBettor, ValidBetOption, ValidBrother); betRepoMock.Verify(m => m.TakeBet(It.IsAny <Bettor>(), It.IsAny <BetOption>(), It.IsAny <Brother>())); }
public void TakeBet_NoOptionId_ThrowsArgumentException() { var bookie = new BookMaker(); Assert.Throws <ArgumentException>(() => bookie.TakeBet(ValidBettor, new BetOption(), ValidBrother)); }
public void TakeBet_NullOption_ThrowsArgumentNullEx() { var bookie = new BookMaker(); Assert.Throws <ArgumentNullException>(() => bookie.TakeBet(ValidBettor, null, ValidBrother)); }