Ejemplo n.º 1
0
        public void IncludeUpperCase_Should_ReturnExpectedPassword()
        {
            // Arrange
            var expected  = @"NDYBGCRV";
            var generator = new PasswordGenerator(123);

            generator.DisableAll();

            // Act
            generator.IncludeUpperCase = true;
            var password = generator.Generate(8);

            // Assert
            Assert.Equal(expected, password);
        }
Ejemplo n.º 2
0
        public void IncludeExtended_Should_ReturnExpectedPassword()
        {
            // Arrange
            var expected  = @"{;:;\\\?";
            var generator = new PasswordGenerator(123);

            generator.DisableAll();

            // Act
            generator.IncludeExtended = true;
            var password = generator.Generate(8);

            // Assert
            Assert.Equal(expected, password);
        }
Ejemplo n.º 3
0
        public void IncludeSymbols_Should_ReturnExpectedPassword()
        {
            // Arrange
            var expected  = @"+!=#^*!!";
            var generator = new PasswordGenerator(123);

            generator.DisableAll();

            // Act
            generator.IncludeSymbols = true;
            var password = generator.Generate(8);

            // Assert
            Assert.Equal(expected, password);
        }
Ejemplo n.º 4
0
        public void IncludeAll_Should_ReturnExpectedPassword()
        {
            // Arrange
            var expected  = @"C:5tFe\w?j}cMyY.&0IHvONDEl8s,r+4*%TX6Kx>LBQqdk3;uW";
            var generator = new PasswordGenerator(123);

            generator.DisableAll();

            // Act
            generator.IncludeAll();
            var password = generator.Generate(50);

            // Assert
            Assert.Equal(expected, password);
        }
Ejemplo n.º 5
0
        public void ProhibitRepeatingCharacters_Should_ReturnExpectedPassword()
        {
            // Arrange
            var expected  = @"{;:\?<}.";
            var generator = new PasswordGenerator(123);

            generator.DisableAll();

            // Act
            generator.IncludeExtended             = true;
            generator.ProhibitRepeatingCharacters = true;
            var password = generator.Generate(8);

            // Assert
            Assert.Equal(expected, password);
        }