Пример #1
0
        public void Should_Generate_True_Or_False()
        {
            int trueCount  = 0;
            int falseCount = 0;

            // Check that roughly 50% of values return true/false
            for (int i = 0; i < 10000; i++)
            {
                var result = Boolean.Next();
                if (result)
                {
                    trueCount++;
                }
                else
                {
                    falseCount++;
                }
            }

            Assert.That(trueCount, Is.GreaterThan(1000));
            Assert.That(falseCount, Is.GreaterThan(1000));
        }