Esempio n. 1
0
        public void RandomString_WithSymbolsOnly_ShouldReturnSymbolOnlyString()
        {
            // Arrange

            // Act

            string random = RandomString(40, letters: null, numbers: null);

            // Assert

            Assert.Equal(40, random.Length);
            Assert.False(random.Any(c => RANDOM_LETTERS.Contains(c)));
            Assert.False(random.Any(c => RANDOM_NUMBER.Contains(c)));
        }
Esempio n. 2
0
        public void RandomString_WithNumbersOnly_ShouldReturnNumericString()
        {
            // Arrange

            // Act

            string random = RandomString(30, letters: null, symbols: null);

            // Assert

            Assert.Equal(30, random.Length);
            Assert.False(random.Any(c => RANDOM_LETTERS.Contains(c)));
            Assert.False(random.Any(c => RANDOM_SYMBOLS.Contains(c)));
        }