public void Meets_minimum_requirements() { string password = new RandomPassword(3); // Requirement: 1 lowercase, 1 uppercase, 1 number, 1 symbol, no whitespace password.ShouldContain(x => char.IsUpper(x)); password.ShouldContain(x => char.IsLower(x)); password.ShouldContain(x => "!@#$%&|?".Contains(x)); password.ShouldContain(x => char.IsNumber(x)); password.ShouldNotContain(x => char.IsWhiteSpace(x)); }
public void Meets_minimum_length() { string password = new RandomPassword(12); password.Length.ShouldBeGreaterThanOrEqualTo(12); }