예제 #1
0
        public void NextRandomString_ReturnsString()
        {
            //arrange
            var generator = new ECTokenGenerator();

            //act
            var random = generator.NextRandomString();

            //assert
            Assert.IsType <string>(random);
        }
예제 #2
0
        public void NextRandomString_WithNoLength_ReturnsStringBetweenMINAndMAX()
        {
            //arrange
            var generator = new ECTokenGenerator();
            int lengthMin = 4;
            int lengthMax = 8;
            //act
            var random = generator.NextRandomString();

            //assert
            Assert.True(random.Length >= lengthMin && random.Length <= lengthMax);
        }
예제 #3
0
        public void NextRandomString_WithLength_ReturnsStringWithSpecifiedSize()
        {
            //arrange
            var generator = new ECTokenGenerator();
            int length    = 50;

            //act
            var random = generator.NextRandomString(50);

            //assert
            Assert.Equal(length, random.Length);
        }