public static void GetPasswordRegex_Should_Return_Success_Match_Only_Lower_Requires() { // arrange var values = new List <string> { "123x", "A$a5 " }; // act var result = RegexUtility.IsMatch(values, RegexUtility.GetPasswordRegex(2, 5, false, false, true, false)); // assert Assert.True(result); }
public static void GetPasswordRegex_Should_Return_Failed_Match_By_Special_All_Criterias() { // arrange var values = new List <string> { "ABcd12$%", "ar1ASDASD" }; // act var result = RegexUtility.IsMatch(values, RegexUtility.GetPasswordRegex(8, 16, true, true, true, true)); // assert Assert.False(result); }
public static void GetPasswordRegex_Should_Return_Failed_Match_By_Only_Number_Requires() { // arrange var values = new List <string> { "ABcd", "1111" }; // act var result = RegexUtility.IsMatch(values, RegexUtility.GetPasswordRegex(2, 5, false, true, false, false)); // assert Assert.False(result); }
public static void GetPasswordRegex_Should_Return_Success_Match_All_Criterias() { // arrange var values = new List <string> { "ABcd12$%", "asdfgh ssR1$" }; // act var result = RegexUtility.IsMatch(values, RegexUtility.GetPasswordRegex(8, 16, true, true, true, true)); // assert Assert.True(result); }