private void TheNumberShouldBeBetweenOneAndFortyNine()
            {
                for (var i = 0; i < 100; i++)
                {
                    var number = LotteryNumber.Generate(new MonoStateRandomNumberGenerator(Int32.MaxValue));

                    Assert.InRange(number.Value, min, max);
                }
            }
Beispiel #2
0
            private void ItShouldWriteItToDisk()
            {
                var writer = new FakeWriter();

                LotteryNumberSetWriter.WriteSet(writer,
                                                LotteryNumberSet.Generate(() => LotteryNumber.Generate(new MonoStateRandomNumberGenerator(Int32.MaxValue))));

                Assert.True(writer.Written);
            }
Beispiel #3
0
            private void TheSetShouldHaveSixNumbers()
            {
                var set = LotteryNumberSet.Generate(() => LotteryNumber.Generate(new MonoStateRandomNumberGenerator(Int32.MaxValue)));

                Assert.Equal(6, set.Count);
            }
Beispiel #4
0
            private void DuplicateNumbersShouldNeverBeAllowed()
            {
                var set = LotteryNumberSet.Generate(() => LotteryNumber.Generate(new FakeRandomNumberGenerator()));

                Assert.Equal(6, set.Count);
            }