public void Should_Generate_Valid_Lottery_Numbers_When_BallCount_Is_Given(int ballCount, int expectedLotteryNumbers) { //Act var lottery = _LotteryService.GenerateLotteryNumbers(ballCount); //Assert Assert.Equal(expectedLotteryNumbers, lottery.GeneratedNumbers.Count); }
public ActionResult GenerateLotteryNumbers(int ballCount) { if (ballCount <= 0) { return(new BadRequestObjectResult("Invalid Input: ballCount value must be greater than zero")); } return(Ok(_LotteryService.GenerateLotteryNumbers(ballCount))); }