예제 #1
0
        public void VerifyRandomNumberListTests(int records, int expectedRecords)
        {
            ISimpleDataGeneratorService simpleDataGeneratorService = new SimpleDataGeneratorService();
            var output = simpleDataGeneratorService.GenerateRandomNumbers(records);

            Assert.True(output.Count() == expectedRecords);
        }
예제 #2
0
        public void VerifyMaxNumberOfRecordsIsSetTo10000()
        {
            ISimpleDataGeneratorService simpleDataGeneratorService = new SimpleDataGeneratorService();
            const string EXCEPTION_MESSAGE = "Maximum limit is 10000";

            var exception = Assert.Throws <OverflowException>(() => simpleDataGeneratorService.GenerateRandomNumbers(10001));

            Assert.True(exception.Message == EXCEPTION_MESSAGE);
        }